/*eslint-disable block-scoped-var, id-length, no-control-regex, no-magic-numbers, no-prototype-builtins, no-redeclare, no-shadow, no-var, sort-vars*/
"use strict";

var $protobuf = require("../3rd/protobuf.js");

// Common aliases
var $Reader = $protobuf.Reader, $Writer = $protobuf.Writer, $util = $protobuf.util;

// Exported root namespace
var $root = $protobuf.roots["default"] || ($protobuf.roots["default"] = {});

$root.ReqWrap = (function() {

    /**
     * Properties of a ReqWrap.
     * @exports IReqWrap
     * @interface IReqWrap
     * @property {number|null} [cmd] ReqWrap cmd
     * @property {number|null} [seq] ReqWrap seq
     * @property {Uint8Array|null} [body] ReqWrap body
     */

    /**
     * Constructs a new ReqWrap.
     * @exports ReqWrap
     * @classdesc Represents a ReqWrap.
     * @implements IReqWrap
     * @constructor
     * @param {IReqWrap=} [properties] Properties to set
     */
    function ReqWrap(properties) {
        if (properties)
            for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                if (properties[keys[i]] != null)
                    this[keys[i]] = properties[keys[i]];
    }

    /**
     * ReqWrap cmd.
     * @member {number} cmd
     * @memberof ReqWrap
     * @instance
     */
    ReqWrap.prototype.cmd = 0;

    /**
     * ReqWrap seq.
     * @member {number} seq
     * @memberof ReqWrap
     * @instance
     */
    ReqWrap.prototype.seq = 0;

    /**
     * ReqWrap body.
     * @member {Uint8Array} body
     * @memberof ReqWrap
     * @instance
     */
    ReqWrap.prototype.body = $util.newBuffer([]);

    /**
     * Creates a new ReqWrap instance using the specified properties.
     * @function create
     * @memberof ReqWrap
     * @static
     * @param {IReqWrap=} [properties] Properties to set
     * @returns {ReqWrap} ReqWrap instance
     */
    ReqWrap.create = function create(properties) {
        return new ReqWrap(properties);
    };

    /**
     * Encodes the specified ReqWrap message. Does not implicitly {@link ReqWrap.verify|verify} messages.
     * @function encode
     * @memberof ReqWrap
     * @static
     * @param {IReqWrap} message ReqWrap message or plain object to encode
     * @param {$protobuf.Writer} [writer] Writer to encode to
     * @returns {$protobuf.Writer} Writer
     */
    ReqWrap.encode = function encode(message, writer) {
        if (!writer)
            writer = $Writer.create();
        if (message.cmd != null && Object.hasOwnProperty.call(message, "cmd"))
            writer.uint32(/* id 0, wireType 0 =*/0).uint32(message.cmd);
        if (message.seq != null && Object.hasOwnProperty.call(message, "seq"))
            writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.seq);
        if (message.body != null && Object.hasOwnProperty.call(message, "body"))
            writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.body);
        return writer;
    };

    /**
     * Encodes the specified ReqWrap message, length delimited. Does not implicitly {@link ReqWrap.verify|verify} messages.
     * @function encodeDelimited
     * @memberof ReqWrap
     * @static
     * @param {IReqWrap} message ReqWrap message or plain object to encode
     * @param {$protobuf.Writer} [writer] Writer to encode to
     * @returns {$protobuf.Writer} Writer
     */
    ReqWrap.encodeDelimited = function encodeDelimited(message, writer) {
        return this.encode(message, writer).ldelim();
    };

    /**
     * Decodes a ReqWrap message from the specified reader or buffer.
     * @function decode
     * @memberof ReqWrap
     * @static
     * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
     * @param {number} [length] Message length if known beforehand
     * @returns {ReqWrap} ReqWrap
     * @throws {Error} If the payload is not a reader or valid buffer
     * @throws {$protobuf.util.ProtocolError} If required fields are missing
     */
    ReqWrap.decode = function decode(reader, length, error) {
        if (!(reader instanceof $Reader))
            reader = $Reader.create(reader);
        var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ReqWrap();
        while (reader.pos < end) {
            var tag = reader.uint32();
            if (tag === error)
                break;
            switch (tag >>> 3) {
            case 0: {
                    message.cmd = reader.uint32();
                    break;
                }
            case 1: {
                    message.seq = reader.uint32();
                    break;
                }
            case 2: {
                    message.body = reader.bytes();
                    break;
                }
            default:
                reader.skipType(tag & 7);
                break;
            }
        }
        return message;
    };

    /**
     * Decodes a ReqWrap message from the specified reader or buffer, length delimited.
     * @function decodeDelimited
     * @memberof ReqWrap
     * @static
     * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
     * @returns {ReqWrap} ReqWrap
     * @throws {Error} If the payload is not a reader or valid buffer
     * @throws {$protobuf.util.ProtocolError} If required fields are missing
     */
    ReqWrap.decodeDelimited = function decodeDelimited(reader) {
        if (!(reader instanceof $Reader))
            reader = new $Reader(reader);
        return this.decode(reader, reader.uint32());
    };

    /**
     * Verifies a ReqWrap message.
     * @function verify
     * @memberof ReqWrap
     * @static
     * @param {Object.<string,*>} message Plain object to verify
     * @returns {string|null} `null` if valid, otherwise the reason why it is not
     */
    ReqWrap.verify = function verify(message) {
        if (typeof message !== "object" || message === null)
            return "object expected";
        if (message.cmd != null && message.hasOwnProperty("cmd"))
            if (!$util.isInteger(message.cmd))
                return "cmd: integer expected";
        if (message.seq != null && message.hasOwnProperty("seq"))
            if (!$util.isInteger(message.seq))
                return "seq: integer expected";
        if (message.body != null && message.hasOwnProperty("body"))
            if (!(message.body && typeof message.body.length === "number" || $util.isString(message.body)))
                return "body: buffer expected";
        return null;
    };

    /**
     * Creates a ReqWrap message from a plain object. Also converts values to their respective internal types.
     * @function fromObject
     * @memberof ReqWrap
     * @static
     * @param {Object.<string,*>} object Plain object
     * @returns {ReqWrap} ReqWrap
     */
    ReqWrap.fromObject = function fromObject(object) {
        if (object instanceof $root.ReqWrap)
            return object;
        var message = new $root.ReqWrap();
        if (object.cmd != null)
            message.cmd = object.cmd >>> 0;
        if (object.seq != null)
            message.seq = object.seq >>> 0;
        if (object.body != null)
            if (typeof object.body === "string")
                $util.base64.decode(object.body, message.body = $util.newBuffer($util.base64.length(object.body)), 0);
            else if (object.body.length >= 0)
                message.body = object.body;
        return message;
    };

    /**
     * Creates a plain object from a ReqWrap message. Also converts values to other types if specified.
     * @function toObject
     * @memberof ReqWrap
     * @static
     * @param {ReqWrap} message ReqWrap
     * @param {$protobuf.IConversionOptions} [options] Conversion options
     * @returns {Object.<string,*>} Plain object
     */
    ReqWrap.toObject = function toObject(message, options) {
        if (!options)
            options = {};
        var object = {};
        if (options.defaults) {
            object.cmd = 0;
            object.seq = 0;
            if (options.bytes === String)
                object.body = "";
            else {
                object.body = [];
                if (options.bytes !== Array)
                    object.body = $util.newBuffer(object.body);
            }
        }
        if (message.cmd != null && message.hasOwnProperty("cmd"))
            object.cmd = message.cmd;
        if (message.seq != null && message.hasOwnProperty("seq"))
            object.seq = message.seq;
        if (message.body != null && message.hasOwnProperty("body"))
            object.body = options.bytes === String ? $util.base64.encode(message.body, 0, message.body.length) : options.bytes === Array ? Array.prototype.slice.call(message.body) : message.body;
        return object;
    };

    /**
     * Converts this ReqWrap to JSON.
     * @function toJSON
     * @memberof ReqWrap
     * @instance
     * @returns {Object.<string,*>} JSON object
     */
    ReqWrap.prototype.toJSON = function toJSON() {
        return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
    };

    /**
     * Gets the default type url for ReqWrap
     * @function getTypeUrl
     * @memberof ReqWrap
     * @static
     * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
     * @returns {string} The default type url
     */
    ReqWrap.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
        if (typeUrlPrefix === undefined) {
            typeUrlPrefix = "type.googleapis.com";
        }
        return typeUrlPrefix + "/ReqWrap";
    };

    return ReqWrap;
})();

$root.RespWrap = (function() {

    /**
     * Properties of a RespWrap.
     * @exports IRespWrap
     * @interface IRespWrap
     * @property {number|null} [cmd] RespWrap cmd
     * @property {number|null} [seq] RespWrap seq
     * @property {number|null} [code] RespWrap code
     * @property {string|null} [msg] RespWrap msg
     * @property {Uint8Array|null} [body] RespWrap body
     */

    /**
     * Constructs a new RespWrap.
     * @exports RespWrap
     * @classdesc Represents a RespWrap.
     * @implements IRespWrap
     * @constructor
     * @param {IRespWrap=} [properties] Properties to set
     */
    function RespWrap(properties) {
        if (properties)
            for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                if (properties[keys[i]] != null)
                    this[keys[i]] = properties[keys[i]];
    }

    /**
     * RespWrap cmd.
     * @member {number} cmd
     * @memberof RespWrap
     * @instance
     */
    RespWrap.prototype.cmd = 0;

    /**
     * RespWrap seq.
     * @member {number} seq
     * @memberof RespWrap
     * @instance
     */
    RespWrap.prototype.seq = 0;

    /**
     * RespWrap code.
     * @member {number} code
     * @memberof RespWrap
     * @instance
     */
    RespWrap.prototype.code = 0;

    /**
     * RespWrap msg.
     * @member {string} msg
     * @memberof RespWrap
     * @instance
     */
    RespWrap.prototype.msg = "";

    /**
     * RespWrap body.
     * @member {Uint8Array} body
     * @memberof RespWrap
     * @instance
     */
    RespWrap.prototype.body = $util.newBuffer([]);

    /**
     * Creates a new RespWrap instance using the specified properties.
     * @function create
     * @memberof RespWrap
     * @static
     * @param {IRespWrap=} [properties] Properties to set
     * @returns {RespWrap} RespWrap instance
     */
    RespWrap.create = function create(properties) {
        return new RespWrap(properties);
    };

    /**
     * Encodes the specified RespWrap message. Does not implicitly {@link RespWrap.verify|verify} messages.
     * @function encode
     * @memberof RespWrap
     * @static
     * @param {IRespWrap} message RespWrap message or plain object to encode
     * @param {$protobuf.Writer} [writer] Writer to encode to
     * @returns {$protobuf.Writer} Writer
     */
    RespWrap.encode = function encode(message, writer) {
        if (!writer)
            writer = $Writer.create();
        if (message.cmd != null && Object.hasOwnProperty.call(message, "cmd"))
            writer.uint32(/* id 0, wireType 0 =*/0).uint32(message.cmd);
        if (message.seq != null && Object.hasOwnProperty.call(message, "seq"))
            writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.seq);
        if (message.code != null && Object.hasOwnProperty.call(message, "code"))
            writer.uint32(/* id 2, wireType 0 =*/16).int32(message.code);
        if (message.msg != null && Object.hasOwnProperty.call(message, "msg"))
            writer.uint32(/* id 3, wireType 2 =*/26).string(message.msg);
        if (message.body != null && Object.hasOwnProperty.call(message, "body"))
            writer.uint32(/* id 4, wireType 2 =*/34).bytes(message.body);
        return writer;
    };

    /**
     * Encodes the specified RespWrap message, length delimited. Does not implicitly {@link RespWrap.verify|verify} messages.
     * @function encodeDelimited
     * @memberof RespWrap
     * @static
     * @param {IRespWrap} message RespWrap message or plain object to encode
     * @param {$protobuf.Writer} [writer] Writer to encode to
     * @returns {$protobuf.Writer} Writer
     */
    RespWrap.encodeDelimited = function encodeDelimited(message, writer) {
        return this.encode(message, writer).ldelim();
    };

    /**
     * Decodes a RespWrap message from the specified reader or buffer.
     * @function decode
     * @memberof RespWrap
     * @static
     * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
     * @param {number} [length] Message length if known beforehand
     * @returns {RespWrap} RespWrap
     * @throws {Error} If the payload is not a reader or valid buffer
     * @throws {$protobuf.util.ProtocolError} If required fields are missing
     */
    RespWrap.decode = function decode(reader, length, error) {
        if (!(reader instanceof $Reader))
            reader = $Reader.create(reader);
        var end = length === undefined ? reader.len : reader.pos + length, message = new $root.RespWrap();
        while (reader.pos < end) {
            var tag = reader.uint32();
            if (tag === error)
                break;
            switch (tag >>> 3) {
            case 0: {
                    message.cmd = reader.uint32();
                    break;
                }
            case 1: {
                    message.seq = reader.uint32();
                    break;
                }
            case 2: {
                    message.code = reader.int32();
                    break;
                }
            case 3: {
                    message.msg = reader.string();
                    break;
                }
            case 4: {
                    message.body = reader.bytes();
                    break;
                }
            default:
                reader.skipType(tag & 7);
                break;
            }
        }
        return message;
    };

    /**
     * Decodes a RespWrap message from the specified reader or buffer, length delimited.
     * @function decodeDelimited
     * @memberof RespWrap
     * @static
     * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
     * @returns {RespWrap} RespWrap
     * @throws {Error} If the payload is not a reader or valid buffer
     * @throws {$protobuf.util.ProtocolError} If required fields are missing
     */
    RespWrap.decodeDelimited = function decodeDelimited(reader) {
        if (!(reader instanceof $Reader))
            reader = new $Reader(reader);
        return this.decode(reader, reader.uint32());
    };

    /**
     * Verifies a RespWrap message.
     * @function verify
     * @memberof RespWrap
     * @static
     * @param {Object.<string,*>} message Plain object to verify
     * @returns {string|null} `null` if valid, otherwise the reason why it is not
     */
    RespWrap.verify = function verify(message) {
        if (typeof message !== "object" || message === null)
            return "object expected";
        if (message.cmd != null && message.hasOwnProperty("cmd"))
            if (!$util.isInteger(message.cmd))
                return "cmd: integer expected";
        if (message.seq != null && message.hasOwnProperty("seq"))
            if (!$util.isInteger(message.seq))
                return "seq: integer expected";
        if (message.code != null && message.hasOwnProperty("code"))
            if (!$util.isInteger(message.code))
                return "code: integer expected";
        if (message.msg != null && message.hasOwnProperty("msg"))
            if (!$util.isString(message.msg))
                return "msg: string expected";
        if (message.body != null && message.hasOwnProperty("body"))
            if (!(message.body && typeof message.body.length === "number" || $util.isString(message.body)))
                return "body: buffer expected";
        return null;
    };

    /**
     * Creates a RespWrap message from a plain object. Also converts values to their respective internal types.
     * @function fromObject
     * @memberof RespWrap
     * @static
     * @param {Object.<string,*>} object Plain object
     * @returns {RespWrap} RespWrap
     */
    RespWrap.fromObject = function fromObject(object) {
        if (object instanceof $root.RespWrap)
            return object;
        var message = new $root.RespWrap();
        if (object.cmd != null)
            message.cmd = object.cmd >>> 0;
        if (object.seq != null)
            message.seq = object.seq >>> 0;
        if (object.code != null)
            message.code = object.code | 0;
        if (object.msg != null)
            message.msg = String(object.msg);
        if (object.body != null)
            if (typeof object.body === "string")
                $util.base64.decode(object.body, message.body = $util.newBuffer($util.base64.length(object.body)), 0);
            else if (object.body.length >= 0)
                message.body = object.body;
        return message;
    };

    /**
     * Creates a plain object from a RespWrap message. Also converts values to other types if specified.
     * @function toObject
     * @memberof RespWrap
     * @static
     * @param {RespWrap} message RespWrap
     * @param {$protobuf.IConversionOptions} [options] Conversion options
     * @returns {Object.<string,*>} Plain object
     */
    RespWrap.toObject = function toObject(message, options) {
        if (!options)
            options = {};
        var object = {};
        if (options.defaults) {
            object.cmd = 0;
            object.seq = 0;
            object.code = 0;
            object.msg = "";
            if (options.bytes === String)
                object.body = "";
            else {
                object.body = [];
                if (options.bytes !== Array)
                    object.body = $util.newBuffer(object.body);
            }
        }
        if (message.cmd != null && message.hasOwnProperty("cmd"))
            object.cmd = message.cmd;
        if (message.seq != null && message.hasOwnProperty("seq"))
            object.seq = message.seq;
        if (message.code != null && message.hasOwnProperty("code"))
            object.code = message.code;
        if (message.msg != null && message.hasOwnProperty("msg"))
            object.msg = message.msg;
        if (message.body != null && message.hasOwnProperty("body"))
            object.body = options.bytes === String ? $util.base64.encode(message.body, 0, message.body.length) : options.bytes === Array ? Array.prototype.slice.call(message.body) : message.body;
        return object;
    };

    /**
     * Converts this RespWrap to JSON.
     * @function toJSON
     * @memberof RespWrap
     * @instance
     * @returns {Object.<string,*>} JSON object
     */
    RespWrap.prototype.toJSON = function toJSON() {
        return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
    };

    /**
     * Gets the default type url for RespWrap
     * @function getTypeUrl
     * @memberof RespWrap
     * @static
     * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
     * @returns {string} The default type url
     */
    RespWrap.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
        if (typeUrlPrefix === undefined) {
            typeUrlPrefix = "type.googleapis.com";
        }
        return typeUrlPrefix + "/RespWrap";
    };

    return RespWrap;
})();

$root.PushWrap = (function() {

    /**
     * Properties of a PushWrap.
     * @exports IPushWrap
     * @interface IPushWrap
     * @property {number|null} [cmd] PushWrap cmd
     * @property {Uint8Array|null} [body] PushWrap body
     */

    /**
     * Constructs a new PushWrap.
     * @exports PushWrap
     * @classdesc Represents a PushWrap.
     * @implements IPushWrap
     * @constructor
     * @param {IPushWrap=} [properties] Properties to set
     */
    function PushWrap(properties) {
        if (properties)
            for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                if (properties[keys[i]] != null)
                    this[keys[i]] = properties[keys[i]];
    }

    /**
     * PushWrap cmd.
     * @member {number} cmd
     * @memberof PushWrap
     * @instance
     */
    PushWrap.prototype.cmd = 0;

    /**
     * PushWrap body.
     * @member {Uint8Array} body
     * @memberof PushWrap
     * @instance
     */
    PushWrap.prototype.body = $util.newBuffer([]);

    /**
     * Creates a new PushWrap instance using the specified properties.
     * @function create
     * @memberof PushWrap
     * @static
     * @param {IPushWrap=} [properties] Properties to set
     * @returns {PushWrap} PushWrap instance
     */
    PushWrap.create = function create(properties) {
        return new PushWrap(properties);
    };

    /**
     * Encodes the specified PushWrap message. Does not implicitly {@link PushWrap.verify|verify} messages.
     * @function encode
     * @memberof PushWrap
     * @static
     * @param {IPushWrap} message PushWrap message or plain object to encode
     * @param {$protobuf.Writer} [writer] Writer to encode to
     * @returns {$protobuf.Writer} Writer
     */
    PushWrap.encode = function encode(message, writer) {
        if (!writer)
            writer = $Writer.create();
        if (message.cmd != null && Object.hasOwnProperty.call(message, "cmd"))
            writer.uint32(/* id 0, wireType 0 =*/0).uint32(message.cmd);
        if (message.body != null && Object.hasOwnProperty.call(message, "body"))
            writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.body);
        return writer;
    };

    /**
     * Encodes the specified PushWrap message, length delimited. Does not implicitly {@link PushWrap.verify|verify} messages.
     * @function encodeDelimited
     * @memberof PushWrap
     * @static
     * @param {IPushWrap} message PushWrap message or plain object to encode
     * @param {$protobuf.Writer} [writer] Writer to encode to
     * @returns {$protobuf.Writer} Writer
     */
    PushWrap.encodeDelimited = function encodeDelimited(message, writer) {
        return this.encode(message, writer).ldelim();
    };

    /**
     * Decodes a PushWrap message from the specified reader or buffer.
     * @function decode
     * @memberof PushWrap
     * @static
     * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
     * @param {number} [length] Message length if known beforehand
     * @returns {PushWrap} PushWrap
     * @throws {Error} If the payload is not a reader or valid buffer
     * @throws {$protobuf.util.ProtocolError} If required fields are missing
     */
    PushWrap.decode = function decode(reader, length, error) {
        if (!(reader instanceof $Reader))
            reader = $Reader.create(reader);
        var end = length === undefined ? reader.len : reader.pos + length, message = new $root.PushWrap();
        while (reader.pos < end) {
            var tag = reader.uint32();
            if (tag === error)
                break;
            switch (tag >>> 3) {
            case 0: {
                    message.cmd = reader.uint32();
                    break;
                }
            case 1: {
                    message.body = reader.bytes();
                    break;
                }
            default:
                reader.skipType(tag & 7);
                break;
            }
        }
        return message;
    };

    /**
     * Decodes a PushWrap message from the specified reader or buffer, length delimited.
     * @function decodeDelimited
     * @memberof PushWrap
     * @static
     * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
     * @returns {PushWrap} PushWrap
     * @throws {Error} If the payload is not a reader or valid buffer
     * @throws {$protobuf.util.ProtocolError} If required fields are missing
     */
    PushWrap.decodeDelimited = function decodeDelimited(reader) {
        if (!(reader instanceof $Reader))
            reader = new $Reader(reader);
        return this.decode(reader, reader.uint32());
    };

    /**
     * Verifies a PushWrap message.
     * @function verify
     * @memberof PushWrap
     * @static
     * @param {Object.<string,*>} message Plain object to verify
     * @returns {string|null} `null` if valid, otherwise the reason why it is not
     */
    PushWrap.verify = function verify(message) {
        if (typeof message !== "object" || message === null)
            return "object expected";
        if (message.cmd != null && message.hasOwnProperty("cmd"))
            if (!$util.isInteger(message.cmd))
                return "cmd: integer expected";
        if (message.body != null && message.hasOwnProperty("body"))
            if (!(message.body && typeof message.body.length === "number" || $util.isString(message.body)))
                return "body: buffer expected";
        return null;
    };

    /**
     * Creates a PushWrap message from a plain object. Also converts values to their respective internal types.
     * @function fromObject
     * @memberof PushWrap
     * @static
     * @param {Object.<string,*>} object Plain object
     * @returns {PushWrap} PushWrap
     */
    PushWrap.fromObject = function fromObject(object) {
        if (object instanceof $root.PushWrap)
            return object;
        var message = new $root.PushWrap();
        if (object.cmd != null)
            message.cmd = object.cmd >>> 0;
        if (object.body != null)
            if (typeof object.body === "string")
                $util.base64.decode(object.body, message.body = $util.newBuffer($util.base64.length(object.body)), 0);
            else if (object.body.length >= 0)
                message.body = object.body;
        return message;
    };

    /**
     * Creates a plain object from a PushWrap message. Also converts values to other types if specified.
     * @function toObject
     * @memberof PushWrap
     * @static
     * @param {PushWrap} message PushWrap
     * @param {$protobuf.IConversionOptions} [options] Conversion options
     * @returns {Object.<string,*>} Plain object
     */
    PushWrap.toObject = function toObject(message, options) {
        if (!options)
            options = {};
        var object = {};
        if (options.defaults) {
            object.cmd = 0;
            if (options.bytes === String)
                object.body = "";
            else {
                object.body = [];
                if (options.bytes !== Array)
                    object.body = $util.newBuffer(object.body);
            }
        }
        if (message.cmd != null && message.hasOwnProperty("cmd"))
            object.cmd = message.cmd;
        if (message.body != null && message.hasOwnProperty("body"))
            object.body = options.bytes === String ? $util.base64.encode(message.body, 0, message.body.length) : options.bytes === Array ? Array.prototype.slice.call(message.body) : message.body;
        return object;
    };

    /**
     * Converts this PushWrap to JSON.
     * @function toJSON
     * @memberof PushWrap
     * @instance
     * @returns {Object.<string,*>} JSON object
     */
    PushWrap.prototype.toJSON = function toJSON() {
        return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
    };

    /**
     * Gets the default type url for PushWrap
     * @function getTypeUrl
     * @memberof PushWrap
     * @static
     * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
     * @returns {string} The default type url
     */
    PushWrap.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
        if (typeUrlPrefix === undefined) {
            typeUrlPrefix = "type.googleapis.com";
        }
        return typeUrlPrefix + "/PushWrap";
    };

    return PushWrap;
})();

$root.Empty = (function() {

    /**
     * Properties of an Empty.
     * @exports IEmpty
     * @interface IEmpty
     */

    /**
     * Constructs a new Empty.
     * @exports Empty
     * @classdesc Represents an Empty.
     * @implements IEmpty
     * @constructor
     * @param {IEmpty=} [properties] Properties to set
     */
    function Empty(properties) {
        if (properties)
            for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                if (properties[keys[i]] != null)
                    this[keys[i]] = properties[keys[i]];
    }

    /**
     * Creates a new Empty instance using the specified properties.
     * @function create
     * @memberof Empty
     * @static
     * @param {IEmpty=} [properties] Properties to set
     * @returns {Empty} Empty instance
     */
    Empty.create = function create(properties) {
        return new Empty(properties);
    };

    /**
     * Encodes the specified Empty message. Does not implicitly {@link Empty.verify|verify} messages.
     * @function encode
     * @memberof Empty
     * @static
     * @param {IEmpty} message Empty message or plain object to encode
     * @param {$protobuf.Writer} [writer] Writer to encode to
     * @returns {$protobuf.Writer} Writer
     */
    Empty.encode = function encode(message, writer) {
        if (!writer)
            writer = $Writer.create();
        return writer;
    };

    /**
     * Encodes the specified Empty message, length delimited. Does not implicitly {@link Empty.verify|verify} messages.
     * @function encodeDelimited
     * @memberof Empty
     * @static
     * @param {IEmpty} message Empty message or plain object to encode
     * @param {$protobuf.Writer} [writer] Writer to encode to
     * @returns {$protobuf.Writer} Writer
     */
    Empty.encodeDelimited = function encodeDelimited(message, writer) {
        return this.encode(message, writer).ldelim();
    };

    /**
     * Decodes an Empty message from the specified reader or buffer.
     * @function decode
     * @memberof Empty
     * @static
     * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
     * @param {number} [length] Message length if known beforehand
     * @returns {Empty} Empty
     * @throws {Error} If the payload is not a reader or valid buffer
     * @throws {$protobuf.util.ProtocolError} If required fields are missing
     */
    Empty.decode = function decode(reader, length, error) {
        if (!(reader instanceof $Reader))
            reader = $Reader.create(reader);
        var end = length === undefined ? reader.len : reader.pos + length, message = new $root.Empty();
        while (reader.pos < end) {
            var tag = reader.uint32();
            if (tag === error)
                break;
            switch (tag >>> 3) {
            default:
                reader.skipType(tag & 7);
                break;
            }
        }
        return message;
    };

    /**
     * Decodes an Empty message from the specified reader or buffer, length delimited.
     * @function decodeDelimited
     * @memberof Empty
     * @static
     * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
     * @returns {Empty} Empty
     * @throws {Error} If the payload is not a reader or valid buffer
     * @throws {$protobuf.util.ProtocolError} If required fields are missing
     */
    Empty.decodeDelimited = function decodeDelimited(reader) {
        if (!(reader instanceof $Reader))
            reader = new $Reader(reader);
        return this.decode(reader, reader.uint32());
    };

    /**
     * Verifies an Empty message.
     * @function verify
     * @memberof Empty
     * @static
     * @param {Object.<string,*>} message Plain object to verify
     * @returns {string|null} `null` if valid, otherwise the reason why it is not
     */
    Empty.verify = function verify(message) {
        if (typeof message !== "object" || message === null)
            return "object expected";
        return null;
    };

    /**
     * Creates an Empty message from a plain object. Also converts values to their respective internal types.
     * @function fromObject
     * @memberof Empty
     * @static
     * @param {Object.<string,*>} object Plain object
     * @returns {Empty} Empty
     */
    Empty.fromObject = function fromObject(object) {
        if (object instanceof $root.Empty)
            return object;
        return new $root.Empty();
    };

    /**
     * Creates a plain object from an Empty message. Also converts values to other types if specified.
     * @function toObject
     * @memberof Empty
     * @static
     * @param {Empty} message Empty
     * @param {$protobuf.IConversionOptions} [options] Conversion options
     * @returns {Object.<string,*>} Plain object
     */
    Empty.toObject = function toObject() {
        return {};
    };

    /**
     * Converts this Empty to JSON.
     * @function toJSON
     * @memberof Empty
     * @instance
     * @returns {Object.<string,*>} JSON object
     */
    Empty.prototype.toJSON = function toJSON() {
        return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
    };

    /**
     * Gets the default type url for Empty
     * @function getTypeUrl
     * @memberof Empty
     * @static
     * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
     * @returns {string} The default type url
     */
    Empty.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
        if (typeUrlPrefix === undefined) {
            typeUrlPrefix = "type.googleapis.com";
        }
        return typeUrlPrefix + "/Empty";
    };

    return Empty;
})();

/**
 * CODE enum.
 * @exports CODE
 * @enum {number}
 * @property {number} DEFAULT=0 DEFAULT value
 * @property {number} SUCCESS=200 SUCCESS value
 * @property {number} PARAM_ERROR=400 PARAM_ERROR value
 * @property {number} CMD_NOT_FOUND=402 CMD_NOT_FOUND value
 */
$root.CODE = (function() {
    var valuesById = {}, values = Object.create(valuesById);
    values[valuesById[0] = "DEFAULT"] = 0;
    values[valuesById[200] = "SUCCESS"] = 200;
    values[valuesById[400] = "PARAM_ERROR"] = 400;
    values[valuesById[402] = "CMD_NOT_FOUND"] = 402;
    return values;
})();

/**
 * RoomStateEnum enum.
 * @exports RoomStateEnum
 * @enum {number}
 * @property {number} FREE=0 FREE value
 * @property {number} PLAYING=1 PLAYING value
 * @property {number} END=2 END value
 */
$root.RoomStateEnum = (function() {
    var valuesById = {}, values = Object.create(valuesById);
    values[valuesById[0] = "FREE"] = 0;
    values[valuesById[1] = "PLAYING"] = 1;
    values[valuesById[2] = "END"] = 2;
    return values;
})();

/**
 * PlayerStateEnum enum.
 * @exports PlayerStateEnum
 * @enum {number}
 * @property {number} NONE=0 NONE value
 * @property {number} SIT=1 SIT value
 * @property {number} READY=2 READY value
 * @property {number} PLAYING=3 PLAYING value
 * @property {number} END=4 END value
 */
$root.PlayerStateEnum = (function() {
    var valuesById = {}, values = Object.create(valuesById);
    values[valuesById[0] = "NONE"] = 0;
    values[valuesById[1] = "SIT"] = 1;
    values[valuesById[2] = "READY"] = 2;
    values[valuesById[3] = "PLAYING"] = 3;
    values[valuesById[4] = "END"] = 4;
    return values;
})();

$root.Author = (function() {

    /**
     * Properties of an Author.
     * @exports IAuthor
     * @interface IAuthor
     * @property {string|null} [authcode] Author authcode
     */

    /**
     * Constructs a new Author.
     * @exports Author
     * @classdesc Represents an Author.
     * @implements IAuthor
     * @constructor
     * @param {IAuthor=} [properties] Properties to set
     */
    function Author(properties) {
        if (properties)
            for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                if (properties[keys[i]] != null)
                    this[keys[i]] = properties[keys[i]];
    }

    /**
     * Author authcode.
     * @member {string} authcode
     * @memberof Author
     * @instance
     */
    Author.prototype.authcode = "";

    /**
     * Creates a new Author instance using the specified properties.
     * @function create
     * @memberof Author
     * @static
     * @param {IAuthor=} [properties] Properties to set
     * @returns {Author} Author instance
     */
    Author.create = function create(properties) {
        return new Author(properties);
    };

    /**
     * Encodes the specified Author message. Does not implicitly {@link Author.verify|verify} messages.
     * @function encode
     * @memberof Author
     * @static
     * @param {IAuthor} message Author message or plain object to encode
     * @param {$protobuf.Writer} [writer] Writer to encode to
     * @returns {$protobuf.Writer} Writer
     */
    Author.encode = function encode(message, writer) {
        if (!writer)
            writer = $Writer.create();
        if (message.authcode != null && Object.hasOwnProperty.call(message, "authcode"))
            writer.uint32(/* id 1, wireType 2 =*/10).string(message.authcode);
        return writer;
    };

    /**
     * Encodes the specified Author message, length delimited. Does not implicitly {@link Author.verify|verify} messages.
     * @function encodeDelimited
     * @memberof Author
     * @static
     * @param {IAuthor} message Author message or plain object to encode
     * @param {$protobuf.Writer} [writer] Writer to encode to
     * @returns {$protobuf.Writer} Writer
     */
    Author.encodeDelimited = function encodeDelimited(message, writer) {
        return this.encode(message, writer).ldelim();
    };

    /**
     * Decodes an Author message from the specified reader or buffer.
     * @function decode
     * @memberof Author
     * @static
     * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
     * @param {number} [length] Message length if known beforehand
     * @returns {Author} Author
     * @throws {Error} If the payload is not a reader or valid buffer
     * @throws {$protobuf.util.ProtocolError} If required fields are missing
     */
    Author.decode = function decode(reader, length, error) {
        if (!(reader instanceof $Reader))
            reader = $Reader.create(reader);
        var end = length === undefined ? reader.len : reader.pos + length, message = new $root.Author();
        while (reader.pos < end) {
            var tag = reader.uint32();
            if (tag === error)
                break;
            switch (tag >>> 3) {
            case 1: {
                    message.authcode = reader.string();
                    break;
                }
            default:
                reader.skipType(tag & 7);
                break;
            }
        }
        return message;
    };

    /**
     * Decodes an Author message from the specified reader or buffer, length delimited.
     * @function decodeDelimited
     * @memberof Author
     * @static
     * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
     * @returns {Author} Author
     * @throws {Error} If the payload is not a reader or valid buffer
     * @throws {$protobuf.util.ProtocolError} If required fields are missing
     */
    Author.decodeDelimited = function decodeDelimited(reader) {
        if (!(reader instanceof $Reader))
            reader = new $Reader(reader);
        return this.decode(reader, reader.uint32());
    };

    /**
     * Verifies an Author message.
     * @function verify
     * @memberof Author
     * @static
     * @param {Object.<string,*>} message Plain object to verify
     * @returns {string|null} `null` if valid, otherwise the reason why it is not
     */
    Author.verify = function verify(message) {
        if (typeof message !== "object" || message === null)
            return "object expected";
        if (message.authcode != null && message.hasOwnProperty("authcode"))
            if (!$util.isString(message.authcode))
                return "authcode: string expected";
        return null;
    };

    /**
     * Creates an Author message from a plain object. Also converts values to their respective internal types.
     * @function fromObject
     * @memberof Author
     * @static
     * @param {Object.<string,*>} object Plain object
     * @returns {Author} Author
     */
    Author.fromObject = function fromObject(object) {
        if (object instanceof $root.Author)
            return object;
        var message = new $root.Author();
        if (object.authcode != null)
            message.authcode = String(object.authcode);
        return message;
    };

    /**
     * Creates a plain object from an Author message. Also converts values to other types if specified.
     * @function toObject
     * @memberof Author
     * @static
     * @param {Author} message Author
     * @param {$protobuf.IConversionOptions} [options] Conversion options
     * @returns {Object.<string,*>} Plain object
     */
    Author.toObject = function toObject(message, options) {
        if (!options)
            options = {};
        var object = {};
        if (options.defaults)
            object.authcode = "";
        if (message.authcode != null && message.hasOwnProperty("authcode"))
            object.authcode = message.authcode;
        return object;
    };

    /**
     * Converts this Author to JSON.
     * @function toJSON
     * @memberof Author
     * @instance
     * @returns {Object.<string,*>} JSON object
     */
    Author.prototype.toJSON = function toJSON() {
        return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
    };

    /**
     * Gets the default type url for Author
     * @function getTypeUrl
     * @memberof Author
     * @static
     * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
     * @returns {string} The default type url
     */
    Author.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
        if (typeUrlPrefix === undefined) {
            typeUrlPrefix = "type.googleapis.com";
        }
        return typeUrlPrefix + "/Author";
    };

    return Author;
})();

$root.Login = (function() {

    /**
     * Properties of a Login.
     * @exports ILogin
     * @interface ILogin
     * @property {string|null} [account] Login account
     * @property {string|null} [password] Login password
     */

    /**
     * Constructs a new Login.
     * @exports Login
     * @classdesc Represents a Login.
     * @implements ILogin
     * @constructor
     * @param {ILogin=} [properties] Properties to set
     */
    function Login(properties) {
        if (properties)
            for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                if (properties[keys[i]] != null)
                    this[keys[i]] = properties[keys[i]];
    }

    /**
     * Login account.
     * @member {string} account
     * @memberof Login
     * @instance
     */
    Login.prototype.account = "";

    /**
     * Login password.
     * @member {string} password
     * @memberof Login
     * @instance
     */
    Login.prototype.password = "";

    /**
     * Creates a new Login instance using the specified properties.
     * @function create
     * @memberof Login
     * @static
     * @param {ILogin=} [properties] Properties to set
     * @returns {Login} Login instance
     */
    Login.create = function create(properties) {
        return new Login(properties);
    };

    /**
     * Encodes the specified Login message. Does not implicitly {@link Login.verify|verify} messages.
     * @function encode
     * @memberof Login
     * @static
     * @param {ILogin} message Login message or plain object to encode
     * @param {$protobuf.Writer} [writer] Writer to encode to
     * @returns {$protobuf.Writer} Writer
     */
    Login.encode = function encode(message, writer) {
        if (!writer)
            writer = $Writer.create();
        if (message.account != null && Object.hasOwnProperty.call(message, "account"))
            writer.uint32(/* id 1, wireType 2 =*/10).string(message.account);
        if (message.password != null && Object.hasOwnProperty.call(message, "password"))
            writer.uint32(/* id 2, wireType 2 =*/18).string(message.password);
        return writer;
    };

    /**
     * Encodes the specified Login message, length delimited. Does not implicitly {@link Login.verify|verify} messages.
     * @function encodeDelimited
     * @memberof Login
     * @static
     * @param {ILogin} message Login message or plain object to encode
     * @param {$protobuf.Writer} [writer] Writer to encode to
     * @returns {$protobuf.Writer} Writer
     */
    Login.encodeDelimited = function encodeDelimited(message, writer) {
        return this.encode(message, writer).ldelim();
    };

    /**
     * Decodes a Login message from the specified reader or buffer.
     * @function decode
     * @memberof Login
     * @static
     * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
     * @param {number} [length] Message length if known beforehand
     * @returns {Login} Login
     * @throws {Error} If the payload is not a reader or valid buffer
     * @throws {$protobuf.util.ProtocolError} If required fields are missing
     */
    Login.decode = function decode(reader, length, error) {
        if (!(reader instanceof $Reader))
            reader = $Reader.create(reader);
        var end = length === undefined ? reader.len : reader.pos + length, message = new $root.Login();
        while (reader.pos < end) {
            var tag = reader.uint32();
            if (tag === error)
                break;
            switch (tag >>> 3) {
            case 1: {
                    message.account = reader.string();
                    break;
                }
            case 2: {
                    message.password = reader.string();
                    break;
                }
            default:
                reader.skipType(tag & 7);
                break;
            }
        }
        return message;
    };

    /**
     * Decodes a Login message from the specified reader or buffer, length delimited.
     * @function decodeDelimited
     * @memberof Login
     * @static
     * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
     * @returns {Login} Login
     * @throws {Error} If the payload is not a reader or valid buffer
     * @throws {$protobuf.util.ProtocolError} If required fields are missing
     */
    Login.decodeDelimited = function decodeDelimited(reader) {
        if (!(reader instanceof $Reader))
            reader = new $Reader(reader);
        return this.decode(reader, reader.uint32());
    };

    /**
     * Verifies a Login message.
     * @function verify
     * @memberof Login
     * @static
     * @param {Object.<string,*>} message Plain object to verify
     * @returns {string|null} `null` if valid, otherwise the reason why it is not
     */
    Login.verify = function verify(message) {
        if (typeof message !== "object" || message === null)
            return "object expected";
        if (message.account != null && message.hasOwnProperty("account"))
            if (!$util.isString(message.account))
                return "account: string expected";
        if (message.password != null && message.hasOwnProperty("password"))
            if (!$util.isString(message.password))
                return "password: string expected";
        return null;
    };

    /**
     * Creates a Login message from a plain object. Also converts values to their respective internal types.
     * @function fromObject
     * @memberof Login
     * @static
     * @param {Object.<string,*>} object Plain object
     * @returns {Login} Login
     */
    Login.fromObject = function fromObject(object) {
        if (object instanceof $root.Login)
            return object;
        var message = new $root.Login();
        if (object.account != null)
            message.account = String(object.account);
        if (object.password != null)
            message.password = String(object.password);
        return message;
    };

    /**
     * Creates a plain object from a Login message. Also converts values to other types if specified.
     * @function toObject
     * @memberof Login
     * @static
     * @param {Login} message Login
     * @param {$protobuf.IConversionOptions} [options] Conversion options
     * @returns {Object.<string,*>} Plain object
     */
    Login.toObject = function toObject(message, options) {
        if (!options)
            options = {};
        var object = {};
        if (options.defaults) {
            object.account = "";
            object.password = "";
        }
        if (message.account != null && message.hasOwnProperty("account"))
            object.account = message.account;
        if (message.password != null && message.hasOwnProperty("password"))
            object.password = message.password;
        return object;
    };

    /**
     * Converts this Login to JSON.
     * @function toJSON
     * @memberof Login
     * @instance
     * @returns {Object.<string,*>} JSON object
     */
    Login.prototype.toJSON = function toJSON() {
        return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
    };

    /**
     * Gets the default type url for Login
     * @function getTypeUrl
     * @memberof Login
     * @static
     * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
     * @returns {string} The default type url
     */
    Login.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
        if (typeUrlPrefix === undefined) {
            typeUrlPrefix = "type.googleapis.com";
        }
        return typeUrlPrefix + "/Login";
    };

    return Login;
})();

$root.LoginResp = (function() {

    /**
     * Properties of a LoginResp.
     * @exports ILoginResp
     * @interface ILoginResp
     * @property {IUserBaseInfo|null} [userBaseInfo] LoginResp userBaseInfo
     * @property {IRoom|null} [roomInfo] LoginResp roomInfo
     */

    /**
     * Constructs a new LoginResp.
     * @exports LoginResp
     * @classdesc Represents a LoginResp.
     * @implements ILoginResp
     * @constructor
     * @param {ILoginResp=} [properties] Properties to set
     */
    function LoginResp(properties) {
        if (properties)
            for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                if (properties[keys[i]] != null)
                    this[keys[i]] = properties[keys[i]];
    }

    /**
     * LoginResp userBaseInfo.
     * @member {IUserBaseInfo|null|undefined} userBaseInfo
     * @memberof LoginResp
     * @instance
     */
    LoginResp.prototype.userBaseInfo = null;

    /**
     * LoginResp roomInfo.
     * @member {IRoom|null|undefined} roomInfo
     * @memberof LoginResp
     * @instance
     */
    LoginResp.prototype.roomInfo = null;

    /**
     * Creates a new LoginResp instance using the specified properties.
     * @function create
     * @memberof LoginResp
     * @static
     * @param {ILoginResp=} [properties] Properties to set
     * @returns {LoginResp} LoginResp instance
     */
    LoginResp.create = function create(properties) {
        return new LoginResp(properties);
    };

    /**
     * Encodes the specified LoginResp message. Does not implicitly {@link LoginResp.verify|verify} messages.
     * @function encode
     * @memberof LoginResp
     * @static
     * @param {ILoginResp} message LoginResp message or plain object to encode
     * @param {$protobuf.Writer} [writer] Writer to encode to
     * @returns {$protobuf.Writer} Writer
     */
    LoginResp.encode = function encode(message, writer) {
        if (!writer)
            writer = $Writer.create();
        if (message.userBaseInfo != null && Object.hasOwnProperty.call(message, "userBaseInfo"))
            $root.UserBaseInfo.encode(message.userBaseInfo, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
        if (message.roomInfo != null && Object.hasOwnProperty.call(message, "roomInfo"))
            $root.Room.encode(message.roomInfo, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
        return writer;
    };

    /**
     * Encodes the specified LoginResp message, length delimited. Does not implicitly {@link LoginResp.verify|verify} messages.
     * @function encodeDelimited
     * @memberof LoginResp
     * @static
     * @param {ILoginResp} message LoginResp message or plain object to encode
     * @param {$protobuf.Writer} [writer] Writer to encode to
     * @returns {$protobuf.Writer} Writer
     */
    LoginResp.encodeDelimited = function encodeDelimited(message, writer) {
        return this.encode(message, writer).ldelim();
    };

    /**
     * Decodes a LoginResp message from the specified reader or buffer.
     * @function decode
     * @memberof LoginResp
     * @static
     * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
     * @param {number} [length] Message length if known beforehand
     * @returns {LoginResp} LoginResp
     * @throws {Error} If the payload is not a reader or valid buffer
     * @throws {$protobuf.util.ProtocolError} If required fields are missing
     */
    LoginResp.decode = function decode(reader, length, error) {
        if (!(reader instanceof $Reader))
            reader = $Reader.create(reader);
        var end = length === undefined ? reader.len : reader.pos + length, message = new $root.LoginResp();
        while (reader.pos < end) {
            var tag = reader.uint32();
            if (tag === error)
                break;
            switch (tag >>> 3) {
            case 1: {
                    message.userBaseInfo = $root.UserBaseInfo.decode(reader, reader.uint32());
                    break;
                }
            case 2: {
                    message.roomInfo = $root.Room.decode(reader, reader.uint32());
                    break;
                }
            default:
                reader.skipType(tag & 7);
                break;
            }
        }
        return message;
    };

    /**
     * Decodes a LoginResp message from the specified reader or buffer, length delimited.
     * @function decodeDelimited
     * @memberof LoginResp
     * @static
     * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
     * @returns {LoginResp} LoginResp
     * @throws {Error} If the payload is not a reader or valid buffer
     * @throws {$protobuf.util.ProtocolError} If required fields are missing
     */
    LoginResp.decodeDelimited = function decodeDelimited(reader) {
        if (!(reader instanceof $Reader))
            reader = new $Reader(reader);
        return this.decode(reader, reader.uint32());
    };

    /**
     * Verifies a LoginResp message.
     * @function verify
     * @memberof LoginResp
     * @static
     * @param {Object.<string,*>} message Plain object to verify
     * @returns {string|null} `null` if valid, otherwise the reason why it is not
     */
    LoginResp.verify = function verify(message) {
        if (typeof message !== "object" || message === null)
            return "object expected";
        if (message.userBaseInfo != null && message.hasOwnProperty("userBaseInfo")) {
            var error = $root.UserBaseInfo.verify(message.userBaseInfo);
            if (error)
                return "userBaseInfo." + error;
        }
        if (message.roomInfo != null && message.hasOwnProperty("roomInfo")) {
            var error = $root.Room.verify(message.roomInfo);
            if (error)
                return "roomInfo." + error;
        }
        return null;
    };

    /**
     * Creates a LoginResp message from a plain object. Also converts values to their respective internal types.
     * @function fromObject
     * @memberof LoginResp
     * @static
     * @param {Object.<string,*>} object Plain object
     * @returns {LoginResp} LoginResp
     */
    LoginResp.fromObject = function fromObject(object) {
        if (object instanceof $root.LoginResp)
            return object;
        var message = new $root.LoginResp();
        if (object.userBaseInfo != null) {
            if (typeof object.userBaseInfo !== "object")
                throw TypeError(".LoginResp.userBaseInfo: object expected");
            message.userBaseInfo = $root.UserBaseInfo.fromObject(object.userBaseInfo);
        }
        if (object.roomInfo != null) {
            if (typeof object.roomInfo !== "object")
                throw TypeError(".LoginResp.roomInfo: object expected");
            message.roomInfo = $root.Room.fromObject(object.roomInfo);
        }
        return message;
    };

    /**
     * Creates a plain object from a LoginResp message. Also converts values to other types if specified.
     * @function toObject
     * @memberof LoginResp
     * @static
     * @param {LoginResp} message LoginResp
     * @param {$protobuf.IConversionOptions} [options] Conversion options
     * @returns {Object.<string,*>} Plain object
     */
    LoginResp.toObject = function toObject(message, options) {
        if (!options)
            options = {};
        var object = {};
        if (options.defaults) {
            object.userBaseInfo = null;
            object.roomInfo = null;
        }
        if (message.userBaseInfo != null && message.hasOwnProperty("userBaseInfo"))
            object.userBaseInfo = $root.UserBaseInfo.toObject(message.userBaseInfo, options);
        if (message.roomInfo != null && message.hasOwnProperty("roomInfo"))
            object.roomInfo = $root.Room.toObject(message.roomInfo, options);
        return object;
    };

    /**
     * Converts this LoginResp to JSON.
     * @function toJSON
     * @memberof LoginResp
     * @instance
     * @returns {Object.<string,*>} JSON object
     */
    LoginResp.prototype.toJSON = function toJSON() {
        return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
    };

    /**
     * Gets the default type url for LoginResp
     * @function getTypeUrl
     * @memberof LoginResp
     * @static
     * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
     * @returns {string} The default type url
     */
    LoginResp.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
        if (typeUrlPrefix === undefined) {
            typeUrlPrefix = "type.googleapis.com";
        }
        return typeUrlPrefix + "/LoginResp";
    };

    return LoginResp;
})();

$root.UserBaseInfo = (function() {

    /**
     * Properties of a UserBaseInfo.
     * @exports IUserBaseInfo
     * @interface IUserBaseInfo
     * @property {string|null} [nickname] UserBaseInfo nickname
     * @property {number|null} [userId] UserBaseInfo userId
     */

    /**
     * Constructs a new UserBaseInfo.
     * @exports UserBaseInfo
     * @classdesc Represents a UserBaseInfo.
     * @implements IUserBaseInfo
     * @constructor
     * @param {IUserBaseInfo=} [properties] Properties to set
     */
    function UserBaseInfo(properties) {
        if (properties)
            for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                if (properties[keys[i]] != null)
                    this[keys[i]] = properties[keys[i]];
    }

    /**
     * UserBaseInfo nickname.
     * @member {string} nickname
     * @memberof UserBaseInfo
     * @instance
     */
    UserBaseInfo.prototype.nickname = "";

    /**
     * UserBaseInfo userId.
     * @member {number} userId
     * @memberof UserBaseInfo
     * @instance
     */
    UserBaseInfo.prototype.userId = 0;

    /**
     * Creates a new UserBaseInfo instance using the specified properties.
     * @function create
     * @memberof UserBaseInfo
     * @static
     * @param {IUserBaseInfo=} [properties] Properties to set
     * @returns {UserBaseInfo} UserBaseInfo instance
     */
    UserBaseInfo.create = function create(properties) {
        return new UserBaseInfo(properties);
    };

    /**
     * Encodes the specified UserBaseInfo message. Does not implicitly {@link UserBaseInfo.verify|verify} messages.
     * @function encode
     * @memberof UserBaseInfo
     * @static
     * @param {IUserBaseInfo} message UserBaseInfo message or plain object to encode
     * @param {$protobuf.Writer} [writer] Writer to encode to
     * @returns {$protobuf.Writer} Writer
     */
    UserBaseInfo.encode = function encode(message, writer) {
        if (!writer)
            writer = $Writer.create();
        if (message.nickname != null && Object.hasOwnProperty.call(message, "nickname"))
            writer.uint32(/* id 1, wireType 2 =*/10).string(message.nickname);
        if (message.userId != null && Object.hasOwnProperty.call(message, "userId"))
            writer.uint32(/* id 2, wireType 0 =*/16).int32(message.userId);
        return writer;
    };

    /**
     * Encodes the specified UserBaseInfo message, length delimited. Does not implicitly {@link UserBaseInfo.verify|verify} messages.
     * @function encodeDelimited
     * @memberof UserBaseInfo
     * @static
     * @param {IUserBaseInfo} message UserBaseInfo message or plain object to encode
     * @param {$protobuf.Writer} [writer] Writer to encode to
     * @returns {$protobuf.Writer} Writer
     */
    UserBaseInfo.encodeDelimited = function encodeDelimited(message, writer) {
        return this.encode(message, writer).ldelim();
    };

    /**
     * Decodes a UserBaseInfo message from the specified reader or buffer.
     * @function decode
     * @memberof UserBaseInfo
     * @static
     * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
     * @param {number} [length] Message length if known beforehand
     * @returns {UserBaseInfo} UserBaseInfo
     * @throws {Error} If the payload is not a reader or valid buffer
     * @throws {$protobuf.util.ProtocolError} If required fields are missing
     */
    UserBaseInfo.decode = function decode(reader, length, error) {
        if (!(reader instanceof $Reader))
            reader = $Reader.create(reader);
        var end = length === undefined ? reader.len : reader.pos + length, message = new $root.UserBaseInfo();
        while (reader.pos < end) {
            var tag = reader.uint32();
            if (tag === error)
                break;
            switch (tag >>> 3) {
            case 1: {
                    message.nickname = reader.string();
                    break;
                }
            case 2: {
                    message.userId = reader.int32();
                    break;
                }
            default:
                reader.skipType(tag & 7);
                break;
            }
        }
        return message;
    };

    /**
     * Decodes a UserBaseInfo message from the specified reader or buffer, length delimited.
     * @function decodeDelimited
     * @memberof UserBaseInfo
     * @static
     * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
     * @returns {UserBaseInfo} UserBaseInfo
     * @throws {Error} If the payload is not a reader or valid buffer
     * @throws {$protobuf.util.ProtocolError} If required fields are missing
     */
    UserBaseInfo.decodeDelimited = function decodeDelimited(reader) {
        if (!(reader instanceof $Reader))
            reader = new $Reader(reader);
        return this.decode(reader, reader.uint32());
    };

    /**
     * Verifies a UserBaseInfo message.
     * @function verify
     * @memberof UserBaseInfo
     * @static
     * @param {Object.<string,*>} message Plain object to verify
     * @returns {string|null} `null` if valid, otherwise the reason why it is not
     */
    UserBaseInfo.verify = function verify(message) {
        if (typeof message !== "object" || message === null)
            return "object expected";
        if (message.nickname != null && message.hasOwnProperty("nickname"))
            if (!$util.isString(message.nickname))
                return "nickname: string expected";
        if (message.userId != null && message.hasOwnProperty("userId"))
            if (!$util.isInteger(message.userId))
                return "userId: integer expected";
        return null;
    };

    /**
     * Creates a UserBaseInfo message from a plain object. Also converts values to their respective internal types.
     * @function fromObject
     * @memberof UserBaseInfo
     * @static
     * @param {Object.<string,*>} object Plain object
     * @returns {UserBaseInfo} UserBaseInfo
     */
    UserBaseInfo.fromObject = function fromObject(object) {
        if (object instanceof $root.UserBaseInfo)
            return object;
        var message = new $root.UserBaseInfo();
        if (object.nickname != null)
            message.nickname = String(object.nickname);
        if (object.userId != null)
            message.userId = object.userId | 0;
        return message;
    };

    /**
     * Creates a plain object from a UserBaseInfo message. Also converts values to other types if specified.
     * @function toObject
     * @memberof UserBaseInfo
     * @static
     * @param {UserBaseInfo} message UserBaseInfo
     * @param {$protobuf.IConversionOptions} [options] Conversion options
     * @returns {Object.<string,*>} Plain object
     */
    UserBaseInfo.toObject = function toObject(message, options) {
        if (!options)
            options = {};
        var object = {};
        if (options.defaults) {
            object.nickname = "";
            object.userId = 0;
        }
        if (message.nickname != null && message.hasOwnProperty("nickname"))
            object.nickname = message.nickname;
        if (message.userId != null && message.hasOwnProperty("userId"))
            object.userId = message.userId;
        return object;
    };

    /**
     * Converts this UserBaseInfo to JSON.
     * @function toJSON
     * @memberof UserBaseInfo
     * @instance
     * @returns {Object.<string,*>} JSON object
     */
    UserBaseInfo.prototype.toJSON = function toJSON() {
        return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
    };

    /**
     * Gets the default type url for UserBaseInfo
     * @function getTypeUrl
     * @memberof UserBaseInfo
     * @static
     * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
     * @returns {string} The default type url
     */
    UserBaseInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
        if (typeUrlPrefix === undefined) {
            typeUrlPrefix = "type.googleapis.com";
        }
        return typeUrlPrefix + "/UserBaseInfo";
    };

    return UserBaseInfo;
})();

$root.RoomUserInfo = (function() {

    /**
     * Properties of a RoomUserInfo.
     * @exports IRoomUserInfo
     * @interface IRoomUserInfo
     * @property {number|null} [userId] RoomUserInfo userId
     * @property {string|null} [nickname] RoomUserInfo nickname
     * @property {PlayerStateEnum|null} [state] RoomUserInfo state
     * @property {number|null} [chair] RoomUserInfo chair
     * @property {boolean|null} [offline] RoomUserInfo offline
     */

    /**
     * Constructs a new RoomUserInfo.
     * @exports RoomUserInfo
     * @classdesc Represents a RoomUserInfo.
     * @implements IRoomUserInfo
     * @constructor
     * @param {IRoomUserInfo=} [properties] Properties to set
     */
    function RoomUserInfo(properties) {
        if (properties)
            for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                if (properties[keys[i]] != null)
                    this[keys[i]] = properties[keys[i]];
    }

    /**
     * RoomUserInfo userId.
     * @member {number} userId
     * @memberof RoomUserInfo
     * @instance
     */
    RoomUserInfo.prototype.userId = 0;

    /**
     * RoomUserInfo nickname.
     * @member {string} nickname
     * @memberof RoomUserInfo
     * @instance
     */
    RoomUserInfo.prototype.nickname = "";

    /**
     * RoomUserInfo state.
     * @member {PlayerStateEnum} state
     * @memberof RoomUserInfo
     * @instance
     */
    RoomUserInfo.prototype.state = 0;

    /**
     * RoomUserInfo chair.
     * @member {number} chair
     * @memberof RoomUserInfo
     * @instance
     */
    RoomUserInfo.prototype.chair = 0;

    /**
     * RoomUserInfo offline.
     * @member {boolean} offline
     * @memberof RoomUserInfo
     * @instance
     */
    RoomUserInfo.prototype.offline = false;

    /**
     * Creates a new RoomUserInfo instance using the specified properties.
     * @function create
     * @memberof RoomUserInfo
     * @static
     * @param {IRoomUserInfo=} [properties] Properties to set
     * @returns {RoomUserInfo} RoomUserInfo instance
     */
    RoomUserInfo.create = function create(properties) {
        return new RoomUserInfo(properties);
    };

    /**
     * Encodes the specified RoomUserInfo message. Does not implicitly {@link RoomUserInfo.verify|verify} messages.
     * @function encode
     * @memberof RoomUserInfo
     * @static
     * @param {IRoomUserInfo} message RoomUserInfo message or plain object to encode
     * @param {$protobuf.Writer} [writer] Writer to encode to
     * @returns {$protobuf.Writer} Writer
     */
    RoomUserInfo.encode = function encode(message, writer) {
        if (!writer)
            writer = $Writer.create();
        if (message.userId != null && Object.hasOwnProperty.call(message, "userId"))
            writer.uint32(/* id 1, wireType 0 =*/8).int32(message.userId);
        if (message.nickname != null && Object.hasOwnProperty.call(message, "nickname"))
            writer.uint32(/* id 2, wireType 2 =*/18).string(message.nickname);
        if (message.state != null && Object.hasOwnProperty.call(message, "state"))
            writer.uint32(/* id 3, wireType 0 =*/24).int32(message.state);
        if (message.chair != null && Object.hasOwnProperty.call(message, "chair"))
            writer.uint32(/* id 4, wireType 0 =*/32).int32(message.chair);
        if (message.offline != null && Object.hasOwnProperty.call(message, "offline"))
            writer.uint32(/* id 5, wireType 0 =*/40).bool(message.offline);
        return writer;
    };

    /**
     * Encodes the specified RoomUserInfo message, length delimited. Does not implicitly {@link RoomUserInfo.verify|verify} messages.
     * @function encodeDelimited
     * @memberof RoomUserInfo
     * @static
     * @param {IRoomUserInfo} message RoomUserInfo message or plain object to encode
     * @param {$protobuf.Writer} [writer] Writer to encode to
     * @returns {$protobuf.Writer} Writer
     */
    RoomUserInfo.encodeDelimited = function encodeDelimited(message, writer) {
        return this.encode(message, writer).ldelim();
    };

    /**
     * Decodes a RoomUserInfo message from the specified reader or buffer.
     * @function decode
     * @memberof RoomUserInfo
     * @static
     * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
     * @param {number} [length] Message length if known beforehand
     * @returns {RoomUserInfo} RoomUserInfo
     * @throws {Error} If the payload is not a reader or valid buffer
     * @throws {$protobuf.util.ProtocolError} If required fields are missing
     */
    RoomUserInfo.decode = function decode(reader, length, error) {
        if (!(reader instanceof $Reader))
            reader = $Reader.create(reader);
        var end = length === undefined ? reader.len : reader.pos + length, message = new $root.RoomUserInfo();
        while (reader.pos < end) {
            var tag = reader.uint32();
            if (tag === error)
                break;
            switch (tag >>> 3) {
            case 1: {
                    message.userId = reader.int32();
                    break;
                }
            case 2: {
                    message.nickname = reader.string();
                    break;
                }
            case 3: {
                    message.state = reader.int32();
                    break;
                }
            case 4: {
                    message.chair = reader.int32();
                    break;
                }
            case 5: {
                    message.offline = reader.bool();
                    break;
                }
            default:
                reader.skipType(tag & 7);
                break;
            }
        }
        return message;
    };

    /**
     * Decodes a RoomUserInfo message from the specified reader or buffer, length delimited.
     * @function decodeDelimited
     * @memberof RoomUserInfo
     * @static
     * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
     * @returns {RoomUserInfo} RoomUserInfo
     * @throws {Error} If the payload is not a reader or valid buffer
     * @throws {$protobuf.util.ProtocolError} If required fields are missing
     */
    RoomUserInfo.decodeDelimited = function decodeDelimited(reader) {
        if (!(reader instanceof $Reader))
            reader = new $Reader(reader);
        return this.decode(reader, reader.uint32());
    };

    /**
     * Verifies a RoomUserInfo message.
     * @function verify
     * @memberof RoomUserInfo
     * @static
     * @param {Object.<string,*>} message Plain object to verify
     * @returns {string|null} `null` if valid, otherwise the reason why it is not
     */
    RoomUserInfo.verify = function verify(message) {
        if (typeof message !== "object" || message === null)
            return "object expected";
        if (message.userId != null && message.hasOwnProperty("userId"))
            if (!$util.isInteger(message.userId))
                return "userId: integer expected";
        if (message.nickname != null && message.hasOwnProperty("nickname"))
            if (!$util.isString(message.nickname))
                return "nickname: string expected";
        if (message.state != null && message.hasOwnProperty("state"))
            switch (message.state) {
            default:
                return "state: enum value expected";
            case 0:
            case 1:
            case 2:
            case 3:
            case 4:
                break;
            }
        if (message.chair != null && message.hasOwnProperty("chair"))
            if (!$util.isInteger(message.chair))
                return "chair: integer expected";
        if (message.offline != null && message.hasOwnProperty("offline"))
            if (typeof message.offline !== "boolean")
                return "offline: boolean expected";
        return null;
    };

    /**
     * Creates a RoomUserInfo message from a plain object. Also converts values to their respective internal types.
     * @function fromObject
     * @memberof RoomUserInfo
     * @static
     * @param {Object.<string,*>} object Plain object
     * @returns {RoomUserInfo} RoomUserInfo
     */
    RoomUserInfo.fromObject = function fromObject(object) {
        if (object instanceof $root.RoomUserInfo)
            return object;
        var message = new $root.RoomUserInfo();
        if (object.userId != null)
            message.userId = object.userId | 0;
        if (object.nickname != null)
            message.nickname = String(object.nickname);
        switch (object.state) {
        default:
            if (typeof object.state === "number") {
                message.state = object.state;
                break;
            }
            break;
        case "NONE":
        case 0:
            message.state = 0;
            break;
        case "SIT":
        case 1:
            message.state = 1;
            break;
        case "READY":
        case 2:
            message.state = 2;
            break;
        case "PLAYING":
        case 3:
            message.state = 3;
            break;
        case "END":
        case 4:
            message.state = 4;
            break;
        }
        if (object.chair != null)
            message.chair = object.chair | 0;
        if (object.offline != null)
            message.offline = Boolean(object.offline);
        return message;
    };

    /**
     * Creates a plain object from a RoomUserInfo message. Also converts values to other types if specified.
     * @function toObject
     * @memberof RoomUserInfo
     * @static
     * @param {RoomUserInfo} message RoomUserInfo
     * @param {$protobuf.IConversionOptions} [options] Conversion options
     * @returns {Object.<string,*>} Plain object
     */
    RoomUserInfo.toObject = function toObject(message, options) {
        if (!options)
            options = {};
        var object = {};
        if (options.defaults) {
            object.userId = 0;
            object.nickname = "";
            object.state = options.enums === String ? "NONE" : 0;
            object.chair = 0;
            object.offline = false;
        }
        if (message.userId != null && message.hasOwnProperty("userId"))
            object.userId = message.userId;
        if (message.nickname != null && message.hasOwnProperty("nickname"))
            object.nickname = message.nickname;
        if (message.state != null && message.hasOwnProperty("state"))
            object.state = options.enums === String ? $root.PlayerStateEnum[message.state] === undefined ? message.state : $root.PlayerStateEnum[message.state] : message.state;
        if (message.chair != null && message.hasOwnProperty("chair"))
            object.chair = message.chair;
        if (message.offline != null && message.hasOwnProperty("offline"))
            object.offline = message.offline;
        return object;
    };

    /**
     * Converts this RoomUserInfo to JSON.
     * @function toJSON
     * @memberof RoomUserInfo
     * @instance
     * @returns {Object.<string,*>} JSON object
     */
    RoomUserInfo.prototype.toJSON = function toJSON() {
        return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
    };

    /**
     * Gets the default type url for RoomUserInfo
     * @function getTypeUrl
     * @memberof RoomUserInfo
     * @static
     * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
     * @returns {string} The default type url
     */
    RoomUserInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
        if (typeUrlPrefix === undefined) {
            typeUrlPrefix = "type.googleapis.com";
        }
        return typeUrlPrefix + "/RoomUserInfo";
    };

    return RoomUserInfo;
})();

$root.RoomUserInfos = (function() {

    /**
     * Properties of a RoomUserInfos.
     * @exports IRoomUserInfos
     * @interface IRoomUserInfos
     * @property {Array.<IRoomUserInfo>|null} [userInfos] RoomUserInfos userInfos
     */

    /**
     * Constructs a new RoomUserInfos.
     * @exports RoomUserInfos
     * @classdesc Represents a RoomUserInfos.
     * @implements IRoomUserInfos
     * @constructor
     * @param {IRoomUserInfos=} [properties] Properties to set
     */
    function RoomUserInfos(properties) {
        this.userInfos = [];
        if (properties)
            for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                if (properties[keys[i]] != null)
                    this[keys[i]] = properties[keys[i]];
    }

    /**
     * RoomUserInfos userInfos.
     * @member {Array.<IRoomUserInfo>} userInfos
     * @memberof RoomUserInfos
     * @instance
     */
    RoomUserInfos.prototype.userInfos = $util.emptyArray;

    /**
     * Creates a new RoomUserInfos instance using the specified properties.
     * @function create
     * @memberof RoomUserInfos
     * @static
     * @param {IRoomUserInfos=} [properties] Properties to set
     * @returns {RoomUserInfos} RoomUserInfos instance
     */
    RoomUserInfos.create = function create(properties) {
        return new RoomUserInfos(properties);
    };

    /**
     * Encodes the specified RoomUserInfos message. Does not implicitly {@link RoomUserInfos.verify|verify} messages.
     * @function encode
     * @memberof RoomUserInfos
     * @static
     * @param {IRoomUserInfos} message RoomUserInfos message or plain object to encode
     * @param {$protobuf.Writer} [writer] Writer to encode to
     * @returns {$protobuf.Writer} Writer
     */
    RoomUserInfos.encode = function encode(message, writer) {
        if (!writer)
            writer = $Writer.create();
        if (message.userInfos != null && message.userInfos.length)
            for (var i = 0; i < message.userInfos.length; ++i)
                $root.RoomUserInfo.encode(message.userInfos[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
        return writer;
    };

    /**
     * Encodes the specified RoomUserInfos message, length delimited. Does not implicitly {@link RoomUserInfos.verify|verify} messages.
     * @function encodeDelimited
     * @memberof RoomUserInfos
     * @static
     * @param {IRoomUserInfos} message RoomUserInfos message or plain object to encode
     * @param {$protobuf.Writer} [writer] Writer to encode to
     * @returns {$protobuf.Writer} Writer
     */
    RoomUserInfos.encodeDelimited = function encodeDelimited(message, writer) {
        return this.encode(message, writer).ldelim();
    };

    /**
     * Decodes a RoomUserInfos message from the specified reader or buffer.
     * @function decode
     * @memberof RoomUserInfos
     * @static
     * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
     * @param {number} [length] Message length if known beforehand
     * @returns {RoomUserInfos} RoomUserInfos
     * @throws {Error} If the payload is not a reader or valid buffer
     * @throws {$protobuf.util.ProtocolError} If required fields are missing
     */
    RoomUserInfos.decode = function decode(reader, length, error) {
        if (!(reader instanceof $Reader))
            reader = $Reader.create(reader);
        var end = length === undefined ? reader.len : reader.pos + length, message = new $root.RoomUserInfos();
        while (reader.pos < end) {
            var tag = reader.uint32();
            if (tag === error)
                break;
            switch (tag >>> 3) {
            case 1: {
                    if (!(message.userInfos && message.userInfos.length))
                        message.userInfos = [];
                    message.userInfos.push($root.RoomUserInfo.decode(reader, reader.uint32()));
                    break;
                }
            default:
                reader.skipType(tag & 7);
                break;
            }
        }
        return message;
    };

    /**
     * Decodes a RoomUserInfos message from the specified reader or buffer, length delimited.
     * @function decodeDelimited
     * @memberof RoomUserInfos
     * @static
     * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
     * @returns {RoomUserInfos} RoomUserInfos
     * @throws {Error} If the payload is not a reader or valid buffer
     * @throws {$protobuf.util.ProtocolError} If required fields are missing
     */
    RoomUserInfos.decodeDelimited = function decodeDelimited(reader) {
        if (!(reader instanceof $Reader))
            reader = new $Reader(reader);
        return this.decode(reader, reader.uint32());
    };

    /**
     * Verifies a RoomUserInfos message.
     * @function verify
     * @memberof RoomUserInfos
     * @static
     * @param {Object.<string,*>} message Plain object to verify
     * @returns {string|null} `null` if valid, otherwise the reason why it is not
     */
    RoomUserInfos.verify = function verify(message) {
        if (typeof message !== "object" || message === null)
            return "object expected";
        if (message.userInfos != null && message.hasOwnProperty("userInfos")) {
            if (!Array.isArray(message.userInfos))
                return "userInfos: array expected";
            for (var i = 0; i < message.userInfos.length; ++i) {
                var error = $root.RoomUserInfo.verify(message.userInfos[i]);
                if (error)
                    return "userInfos." + error;
            }
        }
        return null;
    };

    /**
     * Creates a RoomUserInfos message from a plain object. Also converts values to their respective internal types.
     * @function fromObject
     * @memberof RoomUserInfos
     * @static
     * @param {Object.<string,*>} object Plain object
     * @returns {RoomUserInfos} RoomUserInfos
     */
    RoomUserInfos.fromObject = function fromObject(object) {
        if (object instanceof $root.RoomUserInfos)
            return object;
        var message = new $root.RoomUserInfos();
        if (object.userInfos) {
            if (!Array.isArray(object.userInfos))
                throw TypeError(".RoomUserInfos.userInfos: array expected");
            message.userInfos = [];
            for (var i = 0; i < object.userInfos.length; ++i) {
                if (typeof object.userInfos[i] !== "object")
                    throw TypeError(".RoomUserInfos.userInfos: object expected");
                message.userInfos[i] = $root.RoomUserInfo.fromObject(object.userInfos[i]);
            }
        }
        return message;
    };

    /**
     * Creates a plain object from a RoomUserInfos message. Also converts values to other types if specified.
     * @function toObject
     * @memberof RoomUserInfos
     * @static
     * @param {RoomUserInfos} message RoomUserInfos
     * @param {$protobuf.IConversionOptions} [options] Conversion options
     * @returns {Object.<string,*>} Plain object
     */
    RoomUserInfos.toObject = function toObject(message, options) {
        if (!options)
            options = {};
        var object = {};
        if (options.arrays || options.defaults)
            object.userInfos = [];
        if (message.userInfos && message.userInfos.length) {
            object.userInfos = [];
            for (var j = 0; j < message.userInfos.length; ++j)
                object.userInfos[j] = $root.RoomUserInfo.toObject(message.userInfos[j], options);
        }
        return object;
    };

    /**
     * Converts this RoomUserInfos to JSON.
     * @function toJSON
     * @memberof RoomUserInfos
     * @instance
     * @returns {Object.<string,*>} JSON object
     */
    RoomUserInfos.prototype.toJSON = function toJSON() {
        return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
    };

    /**
     * Gets the default type url for RoomUserInfos
     * @function getTypeUrl
     * @memberof RoomUserInfos
     * @static
     * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
     * @returns {string} The default type url
     */
    RoomUserInfos.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
        if (typeUrlPrefix === undefined) {
            typeUrlPrefix = "type.googleapis.com";
        }
        return typeUrlPrefix + "/RoomUserInfos";
    };

    return RoomUserInfos;
})();

$root.User = (function() {

    /**
     * Properties of a User.
     * @exports IUser
     * @interface IUser
     * @property {number|null} [userId] User userId
     */

    /**
     * Constructs a new User.
     * @exports User
     * @classdesc Represents a User.
     * @implements IUser
     * @constructor
     * @param {IUser=} [properties] Properties to set
     */
    function User(properties) {
        if (properties)
            for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                if (properties[keys[i]] != null)
                    this[keys[i]] = properties[keys[i]];
    }

    /**
     * User userId.
     * @member {number} userId
     * @memberof User
     * @instance
     */
    User.prototype.userId = 0;

    /**
     * Creates a new User instance using the specified properties.
     * @function create
     * @memberof User
     * @static
     * @param {IUser=} [properties] Properties to set
     * @returns {User} User instance
     */
    User.create = function create(properties) {
        return new User(properties);
    };

    /**
     * Encodes the specified User message. Does not implicitly {@link User.verify|verify} messages.
     * @function encode
     * @memberof User
     * @static
     * @param {IUser} message User message or plain object to encode
     * @param {$protobuf.Writer} [writer] Writer to encode to
     * @returns {$protobuf.Writer} Writer
     */
    User.encode = function encode(message, writer) {
        if (!writer)
            writer = $Writer.create();
        if (message.userId != null && Object.hasOwnProperty.call(message, "userId"))
            writer.uint32(/* id 1, wireType 0 =*/8).int32(message.userId);
        return writer;
    };

    /**
     * Encodes the specified User message, length delimited. Does not implicitly {@link User.verify|verify} messages.
     * @function encodeDelimited
     * @memberof User
     * @static
     * @param {IUser} message User message or plain object to encode
     * @param {$protobuf.Writer} [writer] Writer to encode to
     * @returns {$protobuf.Writer} Writer
     */
    User.encodeDelimited = function encodeDelimited(message, writer) {
        return this.encode(message, writer).ldelim();
    };

    /**
     * Decodes a User message from the specified reader or buffer.
     * @function decode
     * @memberof User
     * @static
     * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
     * @param {number} [length] Message length if known beforehand
     * @returns {User} User
     * @throws {Error} If the payload is not a reader or valid buffer
     * @throws {$protobuf.util.ProtocolError} If required fields are missing
     */
    User.decode = function decode(reader, length, error) {
        if (!(reader instanceof $Reader))
            reader = $Reader.create(reader);
        var end = length === undefined ? reader.len : reader.pos + length, message = new $root.User();
        while (reader.pos < end) {
            var tag = reader.uint32();
            if (tag === error)
                break;
            switch (tag >>> 3) {
            case 1: {
                    message.userId = reader.int32();
                    break;
                }
            default:
                reader.skipType(tag & 7);
                break;
            }
        }
        return message;
    };

    /**
     * Decodes a User message from the specified reader or buffer, length delimited.
     * @function decodeDelimited
     * @memberof User
     * @static
     * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
     * @returns {User} User
     * @throws {Error} If the payload is not a reader or valid buffer
     * @throws {$protobuf.util.ProtocolError} If required fields are missing
     */
    User.decodeDelimited = function decodeDelimited(reader) {
        if (!(reader instanceof $Reader))
            reader = new $Reader(reader);
        return this.decode(reader, reader.uint32());
    };

    /**
     * Verifies a User message.
     * @function verify
     * @memberof User
     * @static
     * @param {Object.<string,*>} message Plain object to verify
     * @returns {string|null} `null` if valid, otherwise the reason why it is not
     */
    User.verify = function verify(message) {
        if (typeof message !== "object" || message === null)
            return "object expected";
        if (message.userId != null && message.hasOwnProperty("userId"))
            if (!$util.isInteger(message.userId))
                return "userId: integer expected";
        return null;
    };

    /**
     * Creates a User message from a plain object. Also converts values to their respective internal types.
     * @function fromObject
     * @memberof User
     * @static
     * @param {Object.<string,*>} object Plain object
     * @returns {User} User
     */
    User.fromObject = function fromObject(object) {
        if (object instanceof $root.User)
            return object;
        var message = new $root.User();
        if (object.userId != null)
            message.userId = object.userId | 0;
        return message;
    };

    /**
     * Creates a plain object from a User message. Also converts values to other types if specified.
     * @function toObject
     * @memberof User
     * @static
     * @param {User} message User
     * @param {$protobuf.IConversionOptions} [options] Conversion options
     * @returns {Object.<string,*>} Plain object
     */
    User.toObject = function toObject(message, options) {
        if (!options)
            options = {};
        var object = {};
        if (options.defaults)
            object.userId = 0;
        if (message.userId != null && message.hasOwnProperty("userId"))
            object.userId = message.userId;
        return object;
    };

    /**
     * Converts this User to JSON.
     * @function toJSON
     * @memberof User
     * @instance
     * @returns {Object.<string,*>} JSON object
     */
    User.prototype.toJSON = function toJSON() {
        return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
    };

    /**
     * Gets the default type url for User
     * @function getTypeUrl
     * @memberof User
     * @static
     * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
     * @returns {string} The default type url
     */
    User.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
        if (typeUrlPrefix === undefined) {
            typeUrlPrefix = "type.googleapis.com";
        }
        return typeUrlPrefix + "/User";
    };

    return User;
})();

$root.Kind = (function() {

    /**
     * Properties of a Kind.
     * @exports IKind
     * @interface IKind
     * @property {number|null} [kindId] Kind kindId
     */

    /**
     * Constructs a new Kind.
     * @exports Kind
     * @classdesc Represents a Kind.
     * @implements IKind
     * @constructor
     * @param {IKind=} [properties] Properties to set
     */
    function Kind(properties) {
        if (properties)
            for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                if (properties[keys[i]] != null)
                    this[keys[i]] = properties[keys[i]];
    }

    /**
     * Kind kindId.
     * @member {number} kindId
     * @memberof Kind
     * @instance
     */
    Kind.prototype.kindId = 0;

    /**
     * Creates a new Kind instance using the specified properties.
     * @function create
     * @memberof Kind
     * @static
     * @param {IKind=} [properties] Properties to set
     * @returns {Kind} Kind instance
     */
    Kind.create = function create(properties) {
        return new Kind(properties);
    };

    /**
     * Encodes the specified Kind message. Does not implicitly {@link Kind.verify|verify} messages.
     * @function encode
     * @memberof Kind
     * @static
     * @param {IKind} message Kind message or plain object to encode
     * @param {$protobuf.Writer} [writer] Writer to encode to
     * @returns {$protobuf.Writer} Writer
     */
    Kind.encode = function encode(message, writer) {
        if (!writer)
            writer = $Writer.create();
        if (message.kindId != null && Object.hasOwnProperty.call(message, "kindId"))
            writer.uint32(/* id 1, wireType 0 =*/8).int32(message.kindId);
        return writer;
    };

    /**
     * Encodes the specified Kind message, length delimited. Does not implicitly {@link Kind.verify|verify} messages.
     * @function encodeDelimited
     * @memberof Kind
     * @static
     * @param {IKind} message Kind message or plain object to encode
     * @param {$protobuf.Writer} [writer] Writer to encode to
     * @returns {$protobuf.Writer} Writer
     */
    Kind.encodeDelimited = function encodeDelimited(message, writer) {
        return this.encode(message, writer).ldelim();
    };

    /**
     * Decodes a Kind message from the specified reader or buffer.
     * @function decode
     * @memberof Kind
     * @static
     * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
     * @param {number} [length] Message length if known beforehand
     * @returns {Kind} Kind
     * @throws {Error} If the payload is not a reader or valid buffer
     * @throws {$protobuf.util.ProtocolError} If required fields are missing
     */
    Kind.decode = function decode(reader, length, error) {
        if (!(reader instanceof $Reader))
            reader = $Reader.create(reader);
        var end = length === undefined ? reader.len : reader.pos + length, message = new $root.Kind();
        while (reader.pos < end) {
            var tag = reader.uint32();
            if (tag === error)
                break;
            switch (tag >>> 3) {
            case 1: {
                    message.kindId = reader.int32();
                    break;
                }
            default:
                reader.skipType(tag & 7);
                break;
            }
        }
        return message;
    };

    /**
     * Decodes a Kind message from the specified reader or buffer, length delimited.
     * @function decodeDelimited
     * @memberof Kind
     * @static
     * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
     * @returns {Kind} Kind
     * @throws {Error} If the payload is not a reader or valid buffer
     * @throws {$protobuf.util.ProtocolError} If required fields are missing
     */
    Kind.decodeDelimited = function decodeDelimited(reader) {
        if (!(reader instanceof $Reader))
            reader = new $Reader(reader);
        return this.decode(reader, reader.uint32());
    };

    /**
     * Verifies a Kind message.
     * @function verify
     * @memberof Kind
     * @static
     * @param {Object.<string,*>} message Plain object to verify
     * @returns {string|null} `null` if valid, otherwise the reason why it is not
     */
    Kind.verify = function verify(message) {
        if (typeof message !== "object" || message === null)
            return "object expected";
        if (message.kindId != null && message.hasOwnProperty("kindId"))
            if (!$util.isInteger(message.kindId))
                return "kindId: integer expected";
        return null;
    };

    /**
     * Creates a Kind message from a plain object. Also converts values to their respective internal types.
     * @function fromObject
     * @memberof Kind
     * @static
     * @param {Object.<string,*>} object Plain object
     * @returns {Kind} Kind
     */
    Kind.fromObject = function fromObject(object) {
        if (object instanceof $root.Kind)
            return object;
        var message = new $root.Kind();
        if (object.kindId != null)
            message.kindId = object.kindId | 0;
        return message;
    };

    /**
     * Creates a plain object from a Kind message. Also converts values to other types if specified.
     * @function toObject
     * @memberof Kind
     * @static
     * @param {Kind} message Kind
     * @param {$protobuf.IConversionOptions} [options] Conversion options
     * @returns {Object.<string,*>} Plain object
     */
    Kind.toObject = function toObject(message, options) {
        if (!options)
            options = {};
        var object = {};
        if (options.defaults)
            object.kindId = 0;
        if (message.kindId != null && message.hasOwnProperty("kindId"))
            object.kindId = message.kindId;
        return object;
    };

    /**
     * Converts this Kind to JSON.
     * @function toJSON
     * @memberof Kind
     * @instance
     * @returns {Object.<string,*>} JSON object
     */
    Kind.prototype.toJSON = function toJSON() {
        return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
    };

    /**
     * Gets the default type url for Kind
     * @function getTypeUrl
     * @memberof Kind
     * @static
     * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
     * @returns {string} The default type url
     */
    Kind.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
        if (typeUrlPrefix === undefined) {
            typeUrlPrefix = "type.googleapis.com";
        }
        return typeUrlPrefix + "/Kind";
    };

    return Kind;
})();

$root.Room = (function() {

    /**
     * Properties of a Room.
     * @exports IRoom
     * @interface IRoom
     * @property {number|null} [kindId] Room kindId
     * @property {number|null} [roomId] Room roomId
     */

    /**
     * Constructs a new Room.
     * @exports Room
     * @classdesc Represents a Room.
     * @implements IRoom
     * @constructor
     * @param {IRoom=} [properties] Properties to set
     */
    function Room(properties) {
        if (properties)
            for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                if (properties[keys[i]] != null)
                    this[keys[i]] = properties[keys[i]];
    }

    /**
     * Room kindId.
     * @member {number} kindId
     * @memberof Room
     * @instance
     */
    Room.prototype.kindId = 0;

    /**
     * Room roomId.
     * @member {number} roomId
     * @memberof Room
     * @instance
     */
    Room.prototype.roomId = 0;

    /**
     * Creates a new Room instance using the specified properties.
     * @function create
     * @memberof Room
     * @static
     * @param {IRoom=} [properties] Properties to set
     * @returns {Room} Room instance
     */
    Room.create = function create(properties) {
        return new Room(properties);
    };

    /**
     * Encodes the specified Room message. Does not implicitly {@link Room.verify|verify} messages.
     * @function encode
     * @memberof Room
     * @static
     * @param {IRoom} message Room message or plain object to encode
     * @param {$protobuf.Writer} [writer] Writer to encode to
     * @returns {$protobuf.Writer} Writer
     */
    Room.encode = function encode(message, writer) {
        if (!writer)
            writer = $Writer.create();
        if (message.kindId != null && Object.hasOwnProperty.call(message, "kindId"))
            writer.uint32(/* id 1, wireType 0 =*/8).int32(message.kindId);
        if (message.roomId != null && Object.hasOwnProperty.call(message, "roomId"))
            writer.uint32(/* id 2, wireType 0 =*/16).int32(message.roomId);
        return writer;
    };

    /**
     * Encodes the specified Room message, length delimited. Does not implicitly {@link Room.verify|verify} messages.
     * @function encodeDelimited
     * @memberof Room
     * @static
     * @param {IRoom} message Room message or plain object to encode
     * @param {$protobuf.Writer} [writer] Writer to encode to
     * @returns {$protobuf.Writer} Writer
     */
    Room.encodeDelimited = function encodeDelimited(message, writer) {
        return this.encode(message, writer).ldelim();
    };

    /**
     * Decodes a Room message from the specified reader or buffer.
     * @function decode
     * @memberof Room
     * @static
     * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
     * @param {number} [length] Message length if known beforehand
     * @returns {Room} Room
     * @throws {Error} If the payload is not a reader or valid buffer
     * @throws {$protobuf.util.ProtocolError} If required fields are missing
     */
    Room.decode = function decode(reader, length, error) {
        if (!(reader instanceof $Reader))
            reader = $Reader.create(reader);
        var end = length === undefined ? reader.len : reader.pos + length, message = new $root.Room();
        while (reader.pos < end) {
            var tag = reader.uint32();
            if (tag === error)
                break;
            switch (tag >>> 3) {
            case 1: {
                    message.kindId = reader.int32();
                    break;
                }
            case 2: {
                    message.roomId = reader.int32();
                    break;
                }
            default:
                reader.skipType(tag & 7);
                break;
            }
        }
        return message;
    };

    /**
     * Decodes a Room message from the specified reader or buffer, length delimited.
     * @function decodeDelimited
     * @memberof Room
     * @static
     * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
     * @returns {Room} Room
     * @throws {Error} If the payload is not a reader or valid buffer
     * @throws {$protobuf.util.ProtocolError} If required fields are missing
     */
    Room.decodeDelimited = function decodeDelimited(reader) {
        if (!(reader instanceof $Reader))
            reader = new $Reader(reader);
        return this.decode(reader, reader.uint32());
    };

    /**
     * Verifies a Room message.
     * @function verify
     * @memberof Room
     * @static
     * @param {Object.<string,*>} message Plain object to verify
     * @returns {string|null} `null` if valid, otherwise the reason why it is not
     */
    Room.verify = function verify(message) {
        if (typeof message !== "object" || message === null)
            return "object expected";
        if (message.kindId != null && message.hasOwnProperty("kindId"))
            if (!$util.isInteger(message.kindId))
                return "kindId: integer expected";
        if (message.roomId != null && message.hasOwnProperty("roomId"))
            if (!$util.isInteger(message.roomId))
                return "roomId: integer expected";
        return null;
    };

    /**
     * Creates a Room message from a plain object. Also converts values to their respective internal types.
     * @function fromObject
     * @memberof Room
     * @static
     * @param {Object.<string,*>} object Plain object
     * @returns {Room} Room
     */
    Room.fromObject = function fromObject(object) {
        if (object instanceof $root.Room)
            return object;
        var message = new $root.Room();
        if (object.kindId != null)
            message.kindId = object.kindId | 0;
        if (object.roomId != null)
            message.roomId = object.roomId | 0;
        return message;
    };

    /**
     * Creates a plain object from a Room message. Also converts values to other types if specified.
     * @function toObject
     * @memberof Room
     * @static
     * @param {Room} message Room
     * @param {$protobuf.IConversionOptions} [options] Conversion options
     * @returns {Object.<string,*>} Plain object
     */
    Room.toObject = function toObject(message, options) {
        if (!options)
            options = {};
        var object = {};
        if (options.defaults) {
            object.kindId = 0;
            object.roomId = 0;
        }
        if (message.kindId != null && message.hasOwnProperty("kindId"))
            object.kindId = message.kindId;
        if (message.roomId != null && message.hasOwnProperty("roomId"))
            object.roomId = message.roomId;
        return object;
    };

    /**
     * Converts this Room to JSON.
     * @function toJSON
     * @memberof Room
     * @instance
     * @returns {Object.<string,*>} JSON object
     */
    Room.prototype.toJSON = function toJSON() {
        return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
    };

    /**
     * Gets the default type url for Room
     * @function getTypeUrl
     * @memberof Room
     * @static
     * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
     * @returns {string} The default type url
     */
    Room.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
        if (typeUrlPrefix === undefined) {
            typeUrlPrefix = "type.googleapis.com";
        }
        return typeUrlPrefix + "/Room";
    };

    return Room;
})();

$root.RoomState = (function() {

    /**
     * Properties of a RoomState.
     * @exports IRoomState
     * @interface IRoomState
     * @property {RoomStateEnum|null} [state] RoomState state
     */

    /**
     * Constructs a new RoomState.
     * @exports RoomState
     * @classdesc Represents a RoomState.
     * @implements IRoomState
     * @constructor
     * @param {IRoomState=} [properties] Properties to set
     */
    function RoomState(properties) {
        if (properties)
            for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                if (properties[keys[i]] != null)
                    this[keys[i]] = properties[keys[i]];
    }

    /**
     * RoomState state.
     * @member {RoomStateEnum} state
     * @memberof RoomState
     * @instance
     */
    RoomState.prototype.state = 0;

    /**
     * Creates a new RoomState instance using the specified properties.
     * @function create
     * @memberof RoomState
     * @static
     * @param {IRoomState=} [properties] Properties to set
     * @returns {RoomState} RoomState instance
     */
    RoomState.create = function create(properties) {
        return new RoomState(properties);
    };

    /**
     * Encodes the specified RoomState message. Does not implicitly {@link RoomState.verify|verify} messages.
     * @function encode
     * @memberof RoomState
     * @static
     * @param {IRoomState} message RoomState message or plain object to encode
     * @param {$protobuf.Writer} [writer] Writer to encode to
     * @returns {$protobuf.Writer} Writer
     */
    RoomState.encode = function encode(message, writer) {
        if (!writer)
            writer = $Writer.create();
        if (message.state != null && Object.hasOwnProperty.call(message, "state"))
            writer.uint32(/* id 1, wireType 0 =*/8).int32(message.state);
        return writer;
    };

    /**
     * Encodes the specified RoomState message, length delimited. Does not implicitly {@link RoomState.verify|verify} messages.
     * @function encodeDelimited
     * @memberof RoomState
     * @static
     * @param {IRoomState} message RoomState message or plain object to encode
     * @param {$protobuf.Writer} [writer] Writer to encode to
     * @returns {$protobuf.Writer} Writer
     */
    RoomState.encodeDelimited = function encodeDelimited(message, writer) {
        return this.encode(message, writer).ldelim();
    };

    /**
     * Decodes a RoomState message from the specified reader or buffer.
     * @function decode
     * @memberof RoomState
     * @static
     * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
     * @param {number} [length] Message length if known beforehand
     * @returns {RoomState} RoomState
     * @throws {Error} If the payload is not a reader or valid buffer
     * @throws {$protobuf.util.ProtocolError} If required fields are missing
     */
    RoomState.decode = function decode(reader, length, error) {
        if (!(reader instanceof $Reader))
            reader = $Reader.create(reader);
        var end = length === undefined ? reader.len : reader.pos + length, message = new $root.RoomState();
        while (reader.pos < end) {
            var tag = reader.uint32();
            if (tag === error)
                break;
            switch (tag >>> 3) {
            case 1: {
                    message.state = reader.int32();
                    break;
                }
            default:
                reader.skipType(tag & 7);
                break;
            }
        }
        return message;
    };

    /**
     * Decodes a RoomState message from the specified reader or buffer, length delimited.
     * @function decodeDelimited
     * @memberof RoomState
     * @static
     * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
     * @returns {RoomState} RoomState
     * @throws {Error} If the payload is not a reader or valid buffer
     * @throws {$protobuf.util.ProtocolError} If required fields are missing
     */
    RoomState.decodeDelimited = function decodeDelimited(reader) {
        if (!(reader instanceof $Reader))
            reader = new $Reader(reader);
        return this.decode(reader, reader.uint32());
    };

    /**
     * Verifies a RoomState message.
     * @function verify
     * @memberof RoomState
     * @static
     * @param {Object.<string,*>} message Plain object to verify
     * @returns {string|null} `null` if valid, otherwise the reason why it is not
     */
    RoomState.verify = function verify(message) {
        if (typeof message !== "object" || message === null)
            return "object expected";
        if (message.state != null && message.hasOwnProperty("state"))
            switch (message.state) {
            default:
                return "state: enum value expected";
            case 0:
            case 1:
            case 2:
                break;
            }
        return null;
    };

    /**
     * Creates a RoomState message from a plain object. Also converts values to their respective internal types.
     * @function fromObject
     * @memberof RoomState
     * @static
     * @param {Object.<string,*>} object Plain object
     * @returns {RoomState} RoomState
     */
    RoomState.fromObject = function fromObject(object) {
        if (object instanceof $root.RoomState)
            return object;
        var message = new $root.RoomState();
        switch (object.state) {
        default:
            if (typeof object.state === "number") {
                message.state = object.state;
                break;
            }
            break;
        case "FREE":
        case 0:
            message.state = 0;
            break;
        case "PLAYING":
        case 1:
            message.state = 1;
            break;
        case "END":
        case 2:
            message.state = 2;
            break;
        }
        return message;
    };

    /**
     * Creates a plain object from a RoomState message. Also converts values to other types if specified.
     * @function toObject
     * @memberof RoomState
     * @static
     * @param {RoomState} message RoomState
     * @param {$protobuf.IConversionOptions} [options] Conversion options
     * @returns {Object.<string,*>} Plain object
     */
    RoomState.toObject = function toObject(message, options) {
        if (!options)
            options = {};
        var object = {};
        if (options.defaults)
            object.state = options.enums === String ? "FREE" : 0;
        if (message.state != null && message.hasOwnProperty("state"))
            object.state = options.enums === String ? $root.RoomStateEnum[message.state] === undefined ? message.state : $root.RoomStateEnum[message.state] : message.state;
        return object;
    };

    /**
     * Converts this RoomState to JSON.
     * @function toJSON
     * @memberof RoomState
     * @instance
     * @returns {Object.<string,*>} JSON object
     */
    RoomState.prototype.toJSON = function toJSON() {
        return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
    };

    /**
     * Gets the default type url for RoomState
     * @function getTypeUrl
     * @memberof RoomState
     * @static
     * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
     * @returns {string} The default type url
     */
    RoomState.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
        if (typeUrlPrefix === undefined) {
            typeUrlPrefix = "type.googleapis.com";
        }
        return typeUrlPrefix + "/RoomState";
    };

    return RoomState;
})();

/**
 * SubGame100 enum.
 * @exports SubGame100
 * @enum {number}
 * @property {number} L2N_RoomFree=100001 L2N_RoomFree value
 * @property {number} L2N_RoomPlay=100002 L2N_RoomPlay value
 * @property {number} L2B_RoomStart=100003 L2B_RoomStart value
 * @property {number} L2B_RoomEnd=100004 L2B_RoomEnd value
 * @property {number} C2L_PlayerInput=100005 C2L_PlayerInput value
 * @property {number} L2B_PlayerInput=100006 L2B_PlayerInput value
 */
$root.SubGame100 = (function() {
    var valuesById = {}, values = Object.create(valuesById);
    values[valuesById[100001] = "L2N_RoomFree"] = 100001;
    values[valuesById[100002] = "L2N_RoomPlay"] = 100002;
    values[valuesById[100003] = "L2B_RoomStart"] = 100003;
    values[valuesById[100004] = "L2B_RoomEnd"] = 100004;
    values[valuesById[100005] = "C2L_PlayerInput"] = 100005;
    values[valuesById[100006] = "L2B_PlayerInput"] = 100006;
    return values;
})();

$root.FrameData = (function() {

    /**
     * Properties of a FrameData.
     * @exports IFrameData
     * @interface IFrameData
     * @property {number|null} [userid] FrameData userid
     * @property {number|null} [deltaX] FrameData deltaX
     * @property {number|null} [deltaY] FrameData deltaY
     * @property {number|null} [key] FrameData key
     * @property {number|null} [type] FrameData type
     */

    /**
     * Constructs a new FrameData.
     * @exports FrameData
     * @classdesc Represents a FrameData.
     * @implements IFrameData
     * @constructor
     * @param {IFrameData=} [properties] Properties to set
     */
    function FrameData(properties) {
        if (properties)
            for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                if (properties[keys[i]] != null)
                    this[keys[i]] = properties[keys[i]];
    }

    /**
     * FrameData userid.
     * @member {number} userid
     * @memberof FrameData
     * @instance
     */
    FrameData.prototype.userid = 0;

    /**
     * FrameData deltaX.
     * @member {number} deltaX
     * @memberof FrameData
     * @instance
     */
    FrameData.prototype.deltaX = 0;

    /**
     * FrameData deltaY.
     * @member {number} deltaY
     * @memberof FrameData
     * @instance
     */
    FrameData.prototype.deltaY = 0;

    /**
     * FrameData key.
     * @member {number} key
     * @memberof FrameData
     * @instance
     */
    FrameData.prototype.key = 0;

    /**
     * FrameData type.
     * @member {number} type
     * @memberof FrameData
     * @instance
     */
    FrameData.prototype.type = 0;

    /**
     * Creates a new FrameData instance using the specified properties.
     * @function create
     * @memberof FrameData
     * @static
     * @param {IFrameData=} [properties] Properties to set
     * @returns {FrameData} FrameData instance
     */
    FrameData.create = function create(properties) {
        return new FrameData(properties);
    };

    /**
     * Encodes the specified FrameData message. Does not implicitly {@link FrameData.verify|verify} messages.
     * @function encode
     * @memberof FrameData
     * @static
     * @param {IFrameData} message FrameData message or plain object to encode
     * @param {$protobuf.Writer} [writer] Writer to encode to
     * @returns {$protobuf.Writer} Writer
     */
    FrameData.encode = function encode(message, writer) {
        if (!writer)
            writer = $Writer.create();
        if (message.userid != null && Object.hasOwnProperty.call(message, "userid"))
            writer.uint32(/* id 1, wireType 0 =*/8).int32(message.userid);
        if (message.deltaX != null && Object.hasOwnProperty.call(message, "deltaX"))
            writer.uint32(/* id 2, wireType 5 =*/21).float(message.deltaX);
        if (message.deltaY != null && Object.hasOwnProperty.call(message, "deltaY"))
            writer.uint32(/* id 3, wireType 5 =*/29).float(message.deltaY);
        if (message.key != null && Object.hasOwnProperty.call(message, "key"))
            writer.uint32(/* id 4, wireType 0 =*/32).int32(message.key);
        if (message.type != null && Object.hasOwnProperty.call(message, "type"))
            writer.uint32(/* id 5, wireType 0 =*/40).int32(message.type);
        return writer;
    };

    /**
     * Encodes the specified FrameData message, length delimited. Does not implicitly {@link FrameData.verify|verify} messages.
     * @function encodeDelimited
     * @memberof FrameData
     * @static
     * @param {IFrameData} message FrameData message or plain object to encode
     * @param {$protobuf.Writer} [writer] Writer to encode to
     * @returns {$protobuf.Writer} Writer
     */
    FrameData.encodeDelimited = function encodeDelimited(message, writer) {
        return this.encode(message, writer).ldelim();
    };

    /**
     * Decodes a FrameData message from the specified reader or buffer.
     * @function decode
     * @memberof FrameData
     * @static
     * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
     * @param {number} [length] Message length if known beforehand
     * @returns {FrameData} FrameData
     * @throws {Error} If the payload is not a reader or valid buffer
     * @throws {$protobuf.util.ProtocolError} If required fields are missing
     */
    FrameData.decode = function decode(reader, length, error) {
        if (!(reader instanceof $Reader))
            reader = $Reader.create(reader);
        var end = length === undefined ? reader.len : reader.pos + length, message = new $root.FrameData();
        while (reader.pos < end) {
            var tag = reader.uint32();
            if (tag === error)
                break;
            switch (tag >>> 3) {
            case 1: {
                    message.userid = reader.int32();
                    break;
                }
            case 2: {
                    message.deltaX = reader.float();
                    break;
                }
            case 3: {
                    message.deltaY = reader.float();
                    break;
                }
            case 4: {
                    message.key = reader.int32();
                    break;
                }
            case 5: {
                    message.type = reader.int32();
                    break;
                }
            default:
                reader.skipType(tag & 7);
                break;
            }
        }
        return message;
    };

    /**
     * Decodes a FrameData message from the specified reader or buffer, length delimited.
     * @function decodeDelimited
     * @memberof FrameData
     * @static
     * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
     * @returns {FrameData} FrameData
     * @throws {Error} If the payload is not a reader or valid buffer
     * @throws {$protobuf.util.ProtocolError} If required fields are missing
     */
    FrameData.decodeDelimited = function decodeDelimited(reader) {
        if (!(reader instanceof $Reader))
            reader = new $Reader(reader);
        return this.decode(reader, reader.uint32());
    };

    /**
     * Verifies a FrameData message.
     * @function verify
     * @memberof FrameData
     * @static
     * @param {Object.<string,*>} message Plain object to verify
     * @returns {string|null} `null` if valid, otherwise the reason why it is not
     */
    FrameData.verify = function verify(message) {
        if (typeof message !== "object" || message === null)
            return "object expected";
        if (message.userid != null && message.hasOwnProperty("userid"))
            if (!$util.isInteger(message.userid))
                return "userid: integer expected";
        if (message.deltaX != null && message.hasOwnProperty("deltaX"))
            if (typeof message.deltaX !== "number")
                return "deltaX: number expected";
        if (message.deltaY != null && message.hasOwnProperty("deltaY"))
            if (typeof message.deltaY !== "number")
                return "deltaY: number expected";
        if (message.key != null && message.hasOwnProperty("key"))
            if (!$util.isInteger(message.key))
                return "key: integer expected";
        if (message.type != null && message.hasOwnProperty("type"))
            if (!$util.isInteger(message.type))
                return "type: integer expected";
        return null;
    };

    /**
     * Creates a FrameData message from a plain object. Also converts values to their respective internal types.
     * @function fromObject
     * @memberof FrameData
     * @static
     * @param {Object.<string,*>} object Plain object
     * @returns {FrameData} FrameData
     */
    FrameData.fromObject = function fromObject(object) {
        if (object instanceof $root.FrameData)
            return object;
        var message = new $root.FrameData();
        if (object.userid != null)
            message.userid = object.userid | 0;
        if (object.deltaX != null)
            message.deltaX = Number(object.deltaX);
        if (object.deltaY != null)
            message.deltaY = Number(object.deltaY);
        if (object.key != null)
            message.key = object.key | 0;
        if (object.type != null)
            message.type = object.type | 0;
        return message;
    };

    /**
     * Creates a plain object from a FrameData message. Also converts values to other types if specified.
     * @function toObject
     * @memberof FrameData
     * @static
     * @param {FrameData} message FrameData
     * @param {$protobuf.IConversionOptions} [options] Conversion options
     * @returns {Object.<string,*>} Plain object
     */
    FrameData.toObject = function toObject(message, options) {
        if (!options)
            options = {};
        var object = {};
        if (options.defaults) {
            object.userid = 0;
            object.deltaX = 0;
            object.deltaY = 0;
            object.key = 0;
            object.type = 0;
        }
        if (message.userid != null && message.hasOwnProperty("userid"))
            object.userid = message.userid;
        if (message.deltaX != null && message.hasOwnProperty("deltaX"))
            object.deltaX = options.json && !isFinite(message.deltaX) ? String(message.deltaX) : message.deltaX;
        if (message.deltaY != null && message.hasOwnProperty("deltaY"))
            object.deltaY = options.json && !isFinite(message.deltaY) ? String(message.deltaY) : message.deltaY;
        if (message.key != null && message.hasOwnProperty("key"))
            object.key = message.key;
        if (message.type != null && message.hasOwnProperty("type"))
            object.type = message.type;
        return object;
    };

    /**
     * Converts this FrameData to JSON.
     * @function toJSON
     * @memberof FrameData
     * @instance
     * @returns {Object.<string,*>} JSON object
     */
    FrameData.prototype.toJSON = function toJSON() {
        return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
    };

    /**
     * Gets the default type url for FrameData
     * @function getTypeUrl
     * @memberof FrameData
     * @static
     * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
     * @returns {string} The default type url
     */
    FrameData.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
        if (typeUrlPrefix === undefined) {
            typeUrlPrefix = "type.googleapis.com";
        }
        return typeUrlPrefix + "/FrameData";
    };

    return FrameData;
})();

$root.MSG_C2L_SubGame100_PlayerInput = (function() {

    /**
     * Properties of a MSG_C2L_SubGame100_PlayerInput.
     * @exports IMSG_C2L_SubGame100_PlayerInput
     * @interface IMSG_C2L_SubGame100_PlayerInput
     * @property {IFrameData|null} [data] MSG_C2L_SubGame100_PlayerInput data
     */

    /**
     * Constructs a new MSG_C2L_SubGame100_PlayerInput.
     * @exports MSG_C2L_SubGame100_PlayerInput
     * @classdesc Represents a MSG_C2L_SubGame100_PlayerInput.
     * @implements IMSG_C2L_SubGame100_PlayerInput
     * @constructor
     * @param {IMSG_C2L_SubGame100_PlayerInput=} [properties] Properties to set
     */
    function MSG_C2L_SubGame100_PlayerInput(properties) {
        if (properties)
            for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                if (properties[keys[i]] != null)
                    this[keys[i]] = properties[keys[i]];
    }

    /**
     * MSG_C2L_SubGame100_PlayerInput data.
     * @member {IFrameData|null|undefined} data
     * @memberof MSG_C2L_SubGame100_PlayerInput
     * @instance
     */
    MSG_C2L_SubGame100_PlayerInput.prototype.data = null;

    /**
     * Creates a new MSG_C2L_SubGame100_PlayerInput instance using the specified properties.
     * @function create
     * @memberof MSG_C2L_SubGame100_PlayerInput
     * @static
     * @param {IMSG_C2L_SubGame100_PlayerInput=} [properties] Properties to set
     * @returns {MSG_C2L_SubGame100_PlayerInput} MSG_C2L_SubGame100_PlayerInput instance
     */
    MSG_C2L_SubGame100_PlayerInput.create = function create(properties) {
        return new MSG_C2L_SubGame100_PlayerInput(properties);
    };

    /**
     * Encodes the specified MSG_C2L_SubGame100_PlayerInput message. Does not implicitly {@link MSG_C2L_SubGame100_PlayerInput.verify|verify} messages.
     * @function encode
     * @memberof MSG_C2L_SubGame100_PlayerInput
     * @static
     * @param {IMSG_C2L_SubGame100_PlayerInput} message MSG_C2L_SubGame100_PlayerInput message or plain object to encode
     * @param {$protobuf.Writer} [writer] Writer to encode to
     * @returns {$protobuf.Writer} Writer
     */
    MSG_C2L_SubGame100_PlayerInput.encode = function encode(message, writer) {
        if (!writer)
            writer = $Writer.create();
        if (message.data != null && Object.hasOwnProperty.call(message, "data"))
            $root.FrameData.encode(message.data, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
        return writer;
    };

    /**
     * Encodes the specified MSG_C2L_SubGame100_PlayerInput message, length delimited. Does not implicitly {@link MSG_C2L_SubGame100_PlayerInput.verify|verify} messages.
     * @function encodeDelimited
     * @memberof MSG_C2L_SubGame100_PlayerInput
     * @static
     * @param {IMSG_C2L_SubGame100_PlayerInput} message MSG_C2L_SubGame100_PlayerInput message or plain object to encode
     * @param {$protobuf.Writer} [writer] Writer to encode to
     * @returns {$protobuf.Writer} Writer
     */
    MSG_C2L_SubGame100_PlayerInput.encodeDelimited = function encodeDelimited(message, writer) {
        return this.encode(message, writer).ldelim();
    };

    /**
     * Decodes a MSG_C2L_SubGame100_PlayerInput message from the specified reader or buffer.
     * @function decode
     * @memberof MSG_C2L_SubGame100_PlayerInput
     * @static
     * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
     * @param {number} [length] Message length if known beforehand
     * @returns {MSG_C2L_SubGame100_PlayerInput} MSG_C2L_SubGame100_PlayerInput
     * @throws {Error} If the payload is not a reader or valid buffer
     * @throws {$protobuf.util.ProtocolError} If required fields are missing
     */
    MSG_C2L_SubGame100_PlayerInput.decode = function decode(reader, length, error) {
        if (!(reader instanceof $Reader))
            reader = $Reader.create(reader);
        var end = length === undefined ? reader.len : reader.pos + length, message = new $root.MSG_C2L_SubGame100_PlayerInput();
        while (reader.pos < end) {
            var tag = reader.uint32();
            if (tag === error)
                break;
            switch (tag >>> 3) {
            case 1: {
                    message.data = $root.FrameData.decode(reader, reader.uint32());
                    break;
                }
            default:
                reader.skipType(tag & 7);
                break;
            }
        }
        return message;
    };

    /**
     * Decodes a MSG_C2L_SubGame100_PlayerInput message from the specified reader or buffer, length delimited.
     * @function decodeDelimited
     * @memberof MSG_C2L_SubGame100_PlayerInput
     * @static
     * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
     * @returns {MSG_C2L_SubGame100_PlayerInput} MSG_C2L_SubGame100_PlayerInput
     * @throws {Error} If the payload is not a reader or valid buffer
     * @throws {$protobuf.util.ProtocolError} If required fields are missing
     */
    MSG_C2L_SubGame100_PlayerInput.decodeDelimited = function decodeDelimited(reader) {
        if (!(reader instanceof $Reader))
            reader = new $Reader(reader);
        return this.decode(reader, reader.uint32());
    };

    /**
     * Verifies a MSG_C2L_SubGame100_PlayerInput message.
     * @function verify
     * @memberof MSG_C2L_SubGame100_PlayerInput
     * @static
     * @param {Object.<string,*>} message Plain object to verify
     * @returns {string|null} `null` if valid, otherwise the reason why it is not
     */
    MSG_C2L_SubGame100_PlayerInput.verify = function verify(message) {
        if (typeof message !== "object" || message === null)
            return "object expected";
        if (message.data != null && message.hasOwnProperty("data")) {
            var error = $root.FrameData.verify(message.data);
            if (error)
                return "data." + error;
        }
        return null;
    };

    /**
     * Creates a MSG_C2L_SubGame100_PlayerInput message from a plain object. Also converts values to their respective internal types.
     * @function fromObject
     * @memberof MSG_C2L_SubGame100_PlayerInput
     * @static
     * @param {Object.<string,*>} object Plain object
     * @returns {MSG_C2L_SubGame100_PlayerInput} MSG_C2L_SubGame100_PlayerInput
     */
    MSG_C2L_SubGame100_PlayerInput.fromObject = function fromObject(object) {
        if (object instanceof $root.MSG_C2L_SubGame100_PlayerInput)
            return object;
        var message = new $root.MSG_C2L_SubGame100_PlayerInput();
        if (object.data != null) {
            if (typeof object.data !== "object")
                throw TypeError(".MSG_C2L_SubGame100_PlayerInput.data: object expected");
            message.data = $root.FrameData.fromObject(object.data);
        }
        return message;
    };

    /**
     * Creates a plain object from a MSG_C2L_SubGame100_PlayerInput message. Also converts values to other types if specified.
     * @function toObject
     * @memberof MSG_C2L_SubGame100_PlayerInput
     * @static
     * @param {MSG_C2L_SubGame100_PlayerInput} message MSG_C2L_SubGame100_PlayerInput
     * @param {$protobuf.IConversionOptions} [options] Conversion options
     * @returns {Object.<string,*>} Plain object
     */
    MSG_C2L_SubGame100_PlayerInput.toObject = function toObject(message, options) {
        if (!options)
            options = {};
        var object = {};
        if (options.defaults)
            object.data = null;
        if (message.data != null && message.hasOwnProperty("data"))
            object.data = $root.FrameData.toObject(message.data, options);
        return object;
    };

    /**
     * Converts this MSG_C2L_SubGame100_PlayerInput to JSON.
     * @function toJSON
     * @memberof MSG_C2L_SubGame100_PlayerInput
     * @instance
     * @returns {Object.<string,*>} JSON object
     */
    MSG_C2L_SubGame100_PlayerInput.prototype.toJSON = function toJSON() {
        return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
    };

    /**
     * Gets the default type url for MSG_C2L_SubGame100_PlayerInput
     * @function getTypeUrl
     * @memberof MSG_C2L_SubGame100_PlayerInput
     * @static
     * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
     * @returns {string} The default type url
     */
    MSG_C2L_SubGame100_PlayerInput.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
        if (typeUrlPrefix === undefined) {
            typeUrlPrefix = "type.googleapis.com";
        }
        return typeUrlPrefix + "/MSG_C2L_SubGame100_PlayerInput";
    };

    return MSG_C2L_SubGame100_PlayerInput;
})();

$root.MSG_L2B_SubGame100_PlayerInput = (function() {

    /**
     * Properties of a MSG_L2B_SubGame100_PlayerInput.
     * @exports IMSG_L2B_SubGame100_PlayerInput
     * @interface IMSG_L2B_SubGame100_PlayerInput
     * @property {number|null} [frameId] MSG_L2B_SubGame100_PlayerInput frameId
     * @property {Array.<IFrameData>|null} [datas] MSG_L2B_SubGame100_PlayerInput datas
     */

    /**
     * Constructs a new MSG_L2B_SubGame100_PlayerInput.
     * @exports MSG_L2B_SubGame100_PlayerInput
     * @classdesc Represents a MSG_L2B_SubGame100_PlayerInput.
     * @implements IMSG_L2B_SubGame100_PlayerInput
     * @constructor
     * @param {IMSG_L2B_SubGame100_PlayerInput=} [properties] Properties to set
     */
    function MSG_L2B_SubGame100_PlayerInput(properties) {
        this.datas = [];
        if (properties)
            for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                if (properties[keys[i]] != null)
                    this[keys[i]] = properties[keys[i]];
    }

    /**
     * MSG_L2B_SubGame100_PlayerInput frameId.
     * @member {number} frameId
     * @memberof MSG_L2B_SubGame100_PlayerInput
     * @instance
     */
    MSG_L2B_SubGame100_PlayerInput.prototype.frameId = 0;

    /**
     * MSG_L2B_SubGame100_PlayerInput datas.
     * @member {Array.<IFrameData>} datas
     * @memberof MSG_L2B_SubGame100_PlayerInput
     * @instance
     */
    MSG_L2B_SubGame100_PlayerInput.prototype.datas = $util.emptyArray;

    /**
     * Creates a new MSG_L2B_SubGame100_PlayerInput instance using the specified properties.
     * @function create
     * @memberof MSG_L2B_SubGame100_PlayerInput
     * @static
     * @param {IMSG_L2B_SubGame100_PlayerInput=} [properties] Properties to set
     * @returns {MSG_L2B_SubGame100_PlayerInput} MSG_L2B_SubGame100_PlayerInput instance
     */
    MSG_L2B_SubGame100_PlayerInput.create = function create(properties) {
        return new MSG_L2B_SubGame100_PlayerInput(properties);
    };

    /**
     * Encodes the specified MSG_L2B_SubGame100_PlayerInput message. Does not implicitly {@link MSG_L2B_SubGame100_PlayerInput.verify|verify} messages.
     * @function encode
     * @memberof MSG_L2B_SubGame100_PlayerInput
     * @static
     * @param {IMSG_L2B_SubGame100_PlayerInput} message MSG_L2B_SubGame100_PlayerInput message or plain object to encode
     * @param {$protobuf.Writer} [writer] Writer to encode to
     * @returns {$protobuf.Writer} Writer
     */
    MSG_L2B_SubGame100_PlayerInput.encode = function encode(message, writer) {
        if (!writer)
            writer = $Writer.create();
        if (message.frameId != null && Object.hasOwnProperty.call(message, "frameId"))
            writer.uint32(/* id 1, wireType 0 =*/8).int32(message.frameId);
        if (message.datas != null && message.datas.length)
            for (var i = 0; i < message.datas.length; ++i)
                $root.FrameData.encode(message.datas[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
        return writer;
    };

    /**
     * Encodes the specified MSG_L2B_SubGame100_PlayerInput message, length delimited. Does not implicitly {@link MSG_L2B_SubGame100_PlayerInput.verify|verify} messages.
     * @function encodeDelimited
     * @memberof MSG_L2B_SubGame100_PlayerInput
     * @static
     * @param {IMSG_L2B_SubGame100_PlayerInput} message MSG_L2B_SubGame100_PlayerInput message or plain object to encode
     * @param {$protobuf.Writer} [writer] Writer to encode to
     * @returns {$protobuf.Writer} Writer
     */
    MSG_L2B_SubGame100_PlayerInput.encodeDelimited = function encodeDelimited(message, writer) {
        return this.encode(message, writer).ldelim();
    };

    /**
     * Decodes a MSG_L2B_SubGame100_PlayerInput message from the specified reader or buffer.
     * @function decode
     * @memberof MSG_L2B_SubGame100_PlayerInput
     * @static
     * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
     * @param {number} [length] Message length if known beforehand
     * @returns {MSG_L2B_SubGame100_PlayerInput} MSG_L2B_SubGame100_PlayerInput
     * @throws {Error} If the payload is not a reader or valid buffer
     * @throws {$protobuf.util.ProtocolError} If required fields are missing
     */
    MSG_L2B_SubGame100_PlayerInput.decode = function decode(reader, length, error) {
        if (!(reader instanceof $Reader))
            reader = $Reader.create(reader);
        var end = length === undefined ? reader.len : reader.pos + length, message = new $root.MSG_L2B_SubGame100_PlayerInput();
        while (reader.pos < end) {
            var tag = reader.uint32();
            if (tag === error)
                break;
            switch (tag >>> 3) {
            case 1: {
                    message.frameId = reader.int32();
                    break;
                }
            case 2: {
                    if (!(message.datas && message.datas.length))
                        message.datas = [];
                    message.datas.push($root.FrameData.decode(reader, reader.uint32()));
                    break;
                }
            default:
                reader.skipType(tag & 7);
                break;
            }
        }
        return message;
    };

    /**
     * Decodes a MSG_L2B_SubGame100_PlayerInput message from the specified reader or buffer, length delimited.
     * @function decodeDelimited
     * @memberof MSG_L2B_SubGame100_PlayerInput
     * @static
     * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
     * @returns {MSG_L2B_SubGame100_PlayerInput} MSG_L2B_SubGame100_PlayerInput
     * @throws {Error} If the payload is not a reader or valid buffer
     * @throws {$protobuf.util.ProtocolError} If required fields are missing
     */
    MSG_L2B_SubGame100_PlayerInput.decodeDelimited = function decodeDelimited(reader) {
        if (!(reader instanceof $Reader))
            reader = new $Reader(reader);
        return this.decode(reader, reader.uint32());
    };

    /**
     * Verifies a MSG_L2B_SubGame100_PlayerInput message.
     * @function verify
     * @memberof MSG_L2B_SubGame100_PlayerInput
     * @static
     * @param {Object.<string,*>} message Plain object to verify
     * @returns {string|null} `null` if valid, otherwise the reason why it is not
     */
    MSG_L2B_SubGame100_PlayerInput.verify = function verify(message) {
        if (typeof message !== "object" || message === null)
            return "object expected";
        if (message.frameId != null && message.hasOwnProperty("frameId"))
            if (!$util.isInteger(message.frameId))
                return "frameId: integer expected";
        if (message.datas != null && message.hasOwnProperty("datas")) {
            if (!Array.isArray(message.datas))
                return "datas: array expected";
            for (var i = 0; i < message.datas.length; ++i) {
                var error = $root.FrameData.verify(message.datas[i]);
                if (error)
                    return "datas." + error;
            }
        }
        return null;
    };

    /**
     * Creates a MSG_L2B_SubGame100_PlayerInput message from a plain object. Also converts values to their respective internal types.
     * @function fromObject
     * @memberof MSG_L2B_SubGame100_PlayerInput
     * @static
     * @param {Object.<string,*>} object Plain object
     * @returns {MSG_L2B_SubGame100_PlayerInput} MSG_L2B_SubGame100_PlayerInput
     */
    MSG_L2B_SubGame100_PlayerInput.fromObject = function fromObject(object) {
        if (object instanceof $root.MSG_L2B_SubGame100_PlayerInput)
            return object;
        var message = new $root.MSG_L2B_SubGame100_PlayerInput();
        if (object.frameId != null)
            message.frameId = object.frameId | 0;
        if (object.datas) {
            if (!Array.isArray(object.datas))
                throw TypeError(".MSG_L2B_SubGame100_PlayerInput.datas: array expected");
            message.datas = [];
            for (var i = 0; i < object.datas.length; ++i) {
                if (typeof object.datas[i] !== "object")
                    throw TypeError(".MSG_L2B_SubGame100_PlayerInput.datas: object expected");
                message.datas[i] = $root.FrameData.fromObject(object.datas[i]);
            }
        }
        return message;
    };

    /**
     * Creates a plain object from a MSG_L2B_SubGame100_PlayerInput message. Also converts values to other types if specified.
     * @function toObject
     * @memberof MSG_L2B_SubGame100_PlayerInput
     * @static
     * @param {MSG_L2B_SubGame100_PlayerInput} message MSG_L2B_SubGame100_PlayerInput
     * @param {$protobuf.IConversionOptions} [options] Conversion options
     * @returns {Object.<string,*>} Plain object
     */
    MSG_L2B_SubGame100_PlayerInput.toObject = function toObject(message, options) {
        if (!options)
            options = {};
        var object = {};
        if (options.arrays || options.defaults)
            object.datas = [];
        if (options.defaults)
            object.frameId = 0;
        if (message.frameId != null && message.hasOwnProperty("frameId"))
            object.frameId = message.frameId;
        if (message.datas && message.datas.length) {
            object.datas = [];
            for (var j = 0; j < message.datas.length; ++j)
                object.datas[j] = $root.FrameData.toObject(message.datas[j], options);
        }
        return object;
    };

    /**
     * Converts this MSG_L2B_SubGame100_PlayerInput to JSON.
     * @function toJSON
     * @memberof MSG_L2B_SubGame100_PlayerInput
     * @instance
     * @returns {Object.<string,*>} JSON object
     */
    MSG_L2B_SubGame100_PlayerInput.prototype.toJSON = function toJSON() {
        return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
    };

    /**
     * Gets the default type url for MSG_L2B_SubGame100_PlayerInput
     * @function getTypeUrl
     * @memberof MSG_L2B_SubGame100_PlayerInput
     * @static
     * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
     * @returns {string} The default type url
     */
    MSG_L2B_SubGame100_PlayerInput.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
        if (typeUrlPrefix === undefined) {
            typeUrlPrefix = "type.googleapis.com";
        }
        return typeUrlPrefix + "/MSG_L2B_SubGame100_PlayerInput";
    };

    return MSG_L2B_SubGame100_PlayerInput;
})();

module.exports = $root;
(window || global).proto = $root